[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform] Re: databinding - how do I detect changes in model

On 2/17/2009 9:13 PM, Roy wrote:
Hi

I am trying to build an application which would acquire data from a RSS
feed. I can fetch the data from the rss feeds using the Rome API. I can
also use the jobs api to schedule this. However I am stuck at the point
on how to use data binding to reflect the changes to my model in a table
viewer. My idea is that I should be able to use the Activator class's
start method to start fetching the data from the RSS feed. But where do
I bind the model to the view?

I guess somebody here would have already sorted this out before. I would
really appreciate if you guys would share your experiences with me.

In order for databinding to work, the model has to send notifications when it changes. EMF models do this automatically, and proper JavaBeans too (via the PropertyChangeListener interface). So you're in-memory model of the RSS data should be either one of those or do something else to send notifications (in which case you'd have to write your own observables that know how to wire in to those notifications).


Hope this helps,
Eric