Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » databinding - how do I detect changes in model
databinding - how do I detect changes in model [message #334559] Wed, 18 February 2009 02:13 Go to next message
Roy is currently offline RoyFriend
Messages: 3
Registered: July 2009
Junior Member
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.

Many thanks

Roy
Re: databinding - how do I detect changes in model [message #334569 is a reply to message #334559] Wed, 18 February 2009 14:45 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eclipse-news.rizzoweb.com

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
Re: databinding - how do I detect changes in model [message #334582 is a reply to message #334569] Thu, 19 February 2009 00:41 Go to previous messageGo to next message
Roy is currently offline RoyFriend
Messages: 3
Registered: July 2009
Junior Member
thanks Eric. I was looking at databinding tutorial at vogel's website. I
did write a model class as specified in the tutorial. However I missed the
point on how do I bind the model to the table. I guess we need to put in
tableviewer.setInput().

I am sorry if I have something too elementary. Any code snippets for a RCP
application demonstrating this would be very helpful.

Thanks

Roy
Re: databinding - how do I detect changes in model [message #334593 is a reply to message #334582] Thu, 19 February 2009 15:07 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eclipse-news.rizzoweb.com

On 2/18/2009 7:41 PM, Roy wrote:
> thanks Eric. I was looking at databinding tutorial at vogel's website. I
> did write a model class as specified in the tutorial. However I missed
> the point on how do I bind the model to the table. I guess we need to
> put in tableviewer.setInput().
> I am sorry if I have something too elementary. Any code snippets for a
> RCP application demonstrating this would be very helpful.

Have you looked at the Data Binding Snippets page:
http://wiki.eclipse.org/JFace_Data_Binding/Snippets
I have that project checked out into my workspace so I can easily run
and/or experiment with the code.

Hope this helps,
Eric
Re: databinding - how do I detect changes in model [message #334604 is a reply to message #334593] Fri, 20 February 2009 02:05 Go to previous messageGo to next message
Roy is currently offline RoyFriend
Messages: 3
Registered: July 2009
Junior Member
thanks Eric. It seems like the snippets use the 3.5 version of eclipse. I
also found the below blog which might be of interest to you and others.

http://fire-change-event.blogspot.com/2009/02/bind-viewer-in -one-statement-with.html

Roy
Re: databinding - how do I detect changes in model [message #334612 is a reply to message #334604] Fri, 20 February 2009 14:40 Go to previous message
Eclipse UserFriend
Originally posted by: eclipse-news.rizzoweb.com

On 2/19/2009 9:05 PM, Roy wrote:
> thanks Eric. It seems like the snippets use the 3.5 version of eclipse.

If you want to see the code before the 3.5 changes, you can always check
out from the 3.4 maintenance branch. Oops, there is no 3.4 branch for
that project. But there is a R3_4_1 tag, so I guess that would be what
you'd want.

Eric
Previous Topic:test swt/jface dialog without rcp runtime?
Next Topic:Section Borders.
Goto Forum:
  


Current Time: Tue Nov 12 21:08:38 GMT 2024

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

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

Back to the top