Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 354243 - [Tree] SelectionEvent item is null for virtual tree
Summary: [Tree] SelectionEvent item is null for virtual tree
Status: RESOLVED FIXED
Alias: None
Product: RAP
Classification: RT
Component: RWT (show other bugs)
Version: 1.5   Edit
Hardware: All All
: P2 normal (vote)
Target Milestone: 1.5 M1   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-09 08:57 EDT by Ivan Furnadjiev CLA
Modified: 2011-08-10 04:35 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.