Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » JFace » [DataBinding] Model and UI Independence for Collections(How do you fully separate the UI and Model for Collections?)
[DataBinding] Model and UI Independence for Collections [message #1699121] Sun, 21 June 2015 15:46
Dale Smith is currently offline Dale SmithFriend
Messages: 8
Registered: June 2013
Junior Member
I want to use data binding for collection based entities and have full independence of the UI and Model. I want the model to hold an IObservableCollection (list, set or map), have the ability to update the model from both the UI thread and from tasks on other threads (such as an "import" job) and have the UI correctly reflect all collection changes no matter what thread they've occurred on.

My approach so far is to have my model directly support observable collections. I've tried subclassing AbstractObservableSet with my collection entity but run into null Realm exceptions because Eclipse hasn't yet set the default Realm. And even if I moved model initialization to occur after default Realm setup, I have a hard dependency on the UI and UI setup and I believe (haven't tried or tested) limitations on what threads can update the Observable.

I've considered directly implementing an IObservableXXX interface but that looks quite messy to do.

Is there something fundamental that I'm not understanding here about using data binding and realms for collections in a way that 1) allows full UI and model independence and 2) allows multiple threads to update the observable and have the UI reflect those changes??

I've searched for a direct answer to this but have come up empty. Any help or references are greatly appreciated.

PS - I know that data binding works nicely for simple entities because the JavaBeans spec provides the mechanism for observing changes.
Previous Topic:Jface TreeView File list drag and drop
Next Topic:Lazy content provider with data-binding?
Goto Forum:
  


Current Time: Thu Nov 15 15:05:01 GMT 2018

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

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

Back to the top