Re: [Figleaf-developer] Validation and Observable support
Status: Alpha
Brought to you by:
steckman
|
From: <sam...@ma...> - 2004-07-11 17:31:35
|
Quoting Greg Steckman <ste...@on...>: > I was working on the drag-and-drop support and thought of another case > to handle with the validation framework: a property is a collection, and > an element gets added to the collection. The property setter isn't > called. Only "get" is needed to get the collection, then the collection > add method is used. This also applies to the Observable interface - > intercepting the set call alone won't work. > > One solution would be to add "addElement" and "deleteElement" methods to > the PropertyDescriptor. This gets more complicated when you start to > consider what if the type is actually a Map, or some unknown custom > aggregate type, etc. > Quoting Greg Steckman <ste...@on...>: > I was working on the drag-and-drop support and thought of another case > to handle with the validation framework: a property is a collection, and > an element gets added to the collection. The property setter isn't > called. Only "get" is needed to get the collection, then the collection > add method is used. This also applies to the Observable interface - > intercepting the set call alone won't work. > > One solution would be to add "addElement" and "deleteElement" methods to > the PropertyDescriptor. This gets more complicated when you start to > consider what if the type is actually a Map, or some unknown custom > aggregate type, etc. > > Greg This just becomes a ChangeSet specialization - rather than a Change now being a property->new value mapping, we now have a Change property->Array of new values mappings - write still takes an Object, it just happens to be either a Collection or an array of values. sam http://www.magpiebrain.com/ |