Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 354243

Summary: [Tree] SelectionEvent item is null for virtual tree
Product: [RT] RAP Reporter: Ivan Furnadjiev <ivan>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P2    
Version: 1.5   
Target Milestone: 1.5 M1   
Hardware: All   
OS: All   
Whiteboard:

Description Ivan Furnadjiev CLA 2011-08-09 08:57:35 EDT
Reproducible with Controls Demo -> Tree tab.
1. Check "VIRTUAL"
2. Click "Deselect all"
3. Set items count to 300.
4. Mouse click (to select) one of the items
5. Use arrow down key to scroll the tree.
You will get a NPE like this:
java.lang.NullPointerException
	at org.eclipse.rap.demo.controls.TreeTab$12.widgetSelected(TreeTab.java:238)
	at org.eclipse.swt.events.SelectionEvent.dispatchToObserver(SelectionEvent.java:196)
	at org.eclipse.rwt.internal.events.Event.processEvent(Event.java:44)
	at org.eclipse.swt.events.TypedEvent.processEvent(TypedEvent.java:161)
	at org.eclipse.swt.events.TypedEvent.executeNext(TypedEvent.java:201)
	at org.eclipse.swt.widgets.Display.runPendingMessages(Display.java:1139)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1129)
	at org.eclipse.rap.demo.controls.ControlsDemo.createUI(ControlsDemo.java:46)
	at org.eclipse.rwt.internal.lifecycle.EntryPointManager.createUI(EntryPointManager.java:81)
	at org.eclipse.rwt.internal.lifecycle.RWTLifeCycle.createUI(RWTLifeCycle.java:205)
	at org.eclipse.rwt.internal.lifecycle.RWTLifeCycle$UIThreadController.run(RWTLifeCycle.java:88)
	at java.lang.Thread.run(Thread.java:722)
	at org.eclipse.rwt.internal.lifecycle.UIThread.run(UIThread.java:101)
Comment 1 Ivan Furnadjiev CLA 2011-08-10 04:35:21 EDT
When the selected item on the client is not yet materialize the item id sent by the client is - <parentId>#<itemIndex>. Changed ThreeLCA to respect this format. Changes are in CVS HEAD.