Bug 772681

Summary: Exception thrown in UI when clicking child resource node in discovery queue
Product: [Other] RHQ Project Reporter: John Sanda <jsanda>
Component: Core UIAssignee: John Sanda <jsanda>
Status: CLOSED CURRENTRELEASE QA Contact: Mike Foley <mfoley>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.2CC: hrupp, skondkar
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-09-02 03:20:58 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On:    
Bug Blocks: 694221    

Description John Sanda 2012-01-09 11:28:12 EST
Description of problem:
In the feature/gwt-upgrade branch, when I go to the discovery queue and click on the check box of child resource (i.e., leaf node), I get a globally uncaught exception in the UI. This happens when only when I expand the platform node without selecting it and then selecting one of the child nodes. This does not happen in the master branch.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:
Comment 1 John Sanda 2012-01-09 11:36:04 EST
The exception I see when running in GWT dev mode is,

Caused by: java.lang.ClassCastException: com.smartgwt.client.widgets.grid.ListGridRecord cannot be cast to com.smartgwt.client.widgets.tree.TreeNode 	at org.rhq.enterprise.gui.coregui.client.inventory.resource.discovery.ResourceAutodiscoveryView.updateButtonEnablement(ResourceAutodiscoveryView.java:412) 	at org.rhq.enterprise.gui.coregui.client.inventory.resource.discovery.ResourceAutodiscoveryView.access$3(ResourceAutodiscoveryView.java:391) 	at org.rhq.enterprise.gui.coregui.client.inventory.resource.discovery.ResourceAutodiscoveryView$3.onSelectionChanged(ResourceAutodiscoveryView.java:264)


It appears that this might be due to usage of what is now a deprecated API in ResourceAutoDiscoveryView.
Comment 2 John Sanda 2012-01-09 14:36:40 EST
I have come across a couple SmartGWT forum posts that lead me to believe that this issue could be a regresssion in SmartGWT itself that was introduced in version 2.5. The aforementioned posts are,

http://forums.smartclient.com/showthread.php?t=18457&highlight=TreeNode+ClassCastException

http://forums.smartclient.com/showthread.php?t=19912
Comment 3 John Sanda 2012-01-10 14:26:59 EST
Made change to avoid casting ListGridRecord to TreeNode in feature/gwt-upgrade branch.

commit hash: 1163194d1955b334dfe783876b7f052b306bc737
Comment 4 John Sanda 2012-02-17 11:46:43 EST
This commit has been merged into master.
Comment 5 Sunil Kondkar 2012-04-16 08:55:27 EDT
Verified on build#1334 (Version: 4.4.0-SNAPSHOT Build Number: ca5eecb)

No exception is thrown on clicking child resource node in discovery queue.
Comment 6 Heiko W. Rupp 2013-09-02 03:20:58 EDT
Bulk closing of issues that were VERIFIED, had no target release and where the status changed more than a year ago.