|
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 message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
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 #334593 is a reply to message #334582] |
Thu, 19 February 2009 15:07 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
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 #334612 is a reply to message #334604] |
Fri, 20 February 2009 14:40 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.03415 seconds