Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » bad experience with data binding for TableViewer.
bad experience with data binding for TableViewer. [message #745360] Sat, 22 October 2011 19:31 Go to next message
a.efremov is currently offline a.efremovFriend
Messages: 2
Registered: October 2011
Junior Member
Hello,

Surprisingly, It seems that data binding doesn't work for Viewers if Observable "input" is in different Realm.

That simply means that all that Binding code switching back and forth doesn't make any sense if I can't put model things in different Realm.

Obviously Viewer should live in Display Realm, but model?

-> All processing go in ui.
Then I set input in ui-thread I get following:
assertion failed: Getter called outside realm of observable org.eclipse.core.internal.databinding.beans.BeanObservableListDecorator

at org.eclipse.core.runtime.Assert.isTrue(Assert.java:110)
at org.eclipse.core.databinding.observable.ObservableTracker.getterCalled(ObservableTracker.java:256)
at org.eclipse.core.databinding.observable.DecoratingObservable.getterCalled(DecoratingObservable.java:64)
at org.eclipse.core.databinding.observable.DecoratingObservableCollection.equals(DecoratingObservableCollection.java:121)
at org.eclipse.jface.viewers.StructuredViewer.equals(StructuredViewer.java:727)
at org.eclipse.jface.viewers.AbstractTableViewer.internalRefresh(AbstractTableViewer.java:647)
at org.eclipse.jface.viewers.AbstractTableViewer.internalRefresh(AbstractTableViewer.java:636)
at org.eclipse.jface.viewers.AbstractTableViewer$2.run(AbstractTableViewer.java:592)
at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1443)
at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1404)
at org.eclipse.jface.viewers.AbstractTableViewer.inputChanged(AbstractTableViewer.java:590)
at org.eclipse.jface.viewers.ContentViewer.setInput(ContentViewer.java:280)
at org.eclipse.jface.viewers.StructuredViewer.setInput(StructuredViewer.java:1690)
Re: bad experience with data binding for TableViewer. [message #745436 is a reply to message #745360] Sat, 22 October 2011 20:39 Go to previous message
a.efremov is currently offline a.efremovFriend
Messages: 2
Registered: October 2011
Junior Member
well, ugly but working solution.

buffering,
set WritableList as input and bind it with model Observable.

final TableViewer v = ....
final WritableList xs=new WritableList();
v.setInput(xs);
dbc.bindList(xs,listObservable_In_Model_Realm);


alexander

[Updated on: Sat, 22 October 2011 20:44]

Report message to a moderator

Previous Topic:How to assign help context id to HelpView?
Next Topic:embedded pdf, flash,... does not work in eclipse help with internal browser
Goto Forum:
  


Current Time: Fri Nov 28 22:15:08 GMT 2014

Powered by FUDForum. Page generated in 0.02437 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software