Re: Detecting eo changes when they happen
Re: Detecting eo changes when they happen
- Subject: Re: Detecting eo changes when they happen
- From: Florijan Stamenkovic <email@hidden>
- Date: Fri, 13 Oct 2006 15:43:19 +0200
Hi John,
Hi Florijan,
One option that might be worth considering is adding standard java
bean property change support to your eo's since this is a Swing app.
You could do that via EOGenerator as previously described but another
way could be to do it using aspects. I remember reading an article
about this a while back where you use an annotation to apply an aspect
which then adds the property change support so that you don't have to
implement it for each method. Might be overkill since doing it using a
generated super class it probably easier.
It as a good idea. At the moment I have generated my EO classes to
invoke objectChanged(String key, int changeType, Object oldValue),
where changeType is an indicator if it is an attribute, to-one, or a
to-many change, and oldValue is optional. That method is implemented
in an EO classes' common superclass, and I can easily make it fire a
bean property change.
An advantage of using the bean property change system would be that it
would be easy to bind to other swing components eg Glazed Lists,
http://www.publicobject.com/glazedlists
Yes, that is the whole point, I just never thought of implementing
bean property changes... I thought of making custom controller
classes that will listen for EO change notifications, and fire Swing
events. Thanks for the idea.
Glazed lists look pretty functional, thanks for pointing it out.
Cheers,
Florijan
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden