Skip to main content

ValueChangeEvent & Support for complex properties

3 replies [Last post]
roytmana
Offline
Joined: 2003-06-29

I just started with JDNC so forgive me if I missed something obvious.

As far as I can see JDNC event system considers only simple properties with cardinality 1:1 to owning model (let say bean) when firing events on model change and. From past experience I find it very usefull to support notification on change of properties with cardinality 1-N to owning model - specifically collections. When property of collection type changes model should fire ValueChangeEvent with some additional properties - type of modification (add/remove/update) and added/removed/modified member of the collection. It will allow listening views (e.g table) to refresh itself and move selection point on addition/deletion appropriately (if selection model choose to listen for data model events)

Collection type property can be anything - list, iterator, array ... because adapters can be easilly developed to cache this collection data in a list (used by views) and have this adapter to listen on underlying collection events to refresh itself

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
roytmana
Offline
Joined: 2003-06-29

Just curious why beans PropertyChangeEvent and coresponding listeners were not used in jdnc? Not that I like New/Old value parameters it carries but still

Mark Davidson

Hi Alex,

On 08/31/2004 03:17 PM, jdnc-interest@javadesktop.org wrote:
> Just curious why beans PropertyChangeEvent and coresponding listeners
> were not used in jdnc? Not that I like New/Old value parameters it
> carries but still.

Are you refering to the MessageEvent or ProgressEvent in
org.jdesktop.swing.event? Those events were introduced as a lightweight
message passing system to communicate events to the UI. These messages
were not property changes so a different event should be used.

We are still in the process of Beanifying/Toolifying the components so
there are a lot of pending property change notifications that should be
implemented.

--Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: jdnc-unsubscribe@jdnc.dev.java.net
For additional commands, e-mail: jdnc-help@jdnc.dev.java.net

roytmana
Offline
Joined: 2003-06-29

I am talking about ValueChangeEvent - the one fired by models