Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Fire Property Changes to keep views in sync of model  RSS feed

 
Vipul Bahuguna
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi -

my model classes are getting generated using jaxb.
so the situation is like -

class A {
List<B> fields = new ArrayList<B>();
...
}

class B {
List<C> fields = new ArrayList<C>();
...
}

and so on for Class C, D, E, etc.
The UI displays this data in JFace viewers like TableViewer, ComboViewer.

UI has the ability to allow add/remove/modify the data.

What is the best way to keep the UI and model in sync if I don't want to add code to the classes generated by jaxb.

thanks!
 
Tim Holloway
Bartender
Posts: 18531
61
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could you try explaining that again? I cannot figure out what you mean.
 
Stephan van Hulst
Saloon Keeper
Posts: 6980
110
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your can probably do this by adding custom listeners to your UI classes that update your generated models. I don't think you can generate classes that implement specific interfaces.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!