Hi Dirk, After thinking this through a bit, I am starting to think that your idea to use an annotation here might make sense. I believe you suggested something along the lines of:
@IDProperty(name="foo") If this attribute is specified, WTKXSerializer would propagate the ID value to the given property. This would avoid the name duplication and would be a fairly trivial change. I'm still not convinced that it is absolutely necessary, but it is nice to have and obviously has some use cases. Also, I believe Spring offers a similar feature via the BeanNameAware interface, so it would be nice to have a comparable feature. G On Jun 8, 2010, at 6:03 PM, Dirk Möbius wrote: > Greg Brown wrote: >> We don't actually need an annotation for this. Simply adding the getter and >> setter is sufficient to support the "name" attribute. > > Oh, I thought the wtkx:id should be used as the name. So that you don't have > to set an id AND a name: > > <PushButton wktx:id="myButton"/> > > looks better than: > > <PushButton wktx:id="myButton" name="myButton"/> > > I thought it would have been considered as a general good thing to have the > wtkx:id injected into any object instance (of any type, in case it's > annotated). > > Dirk.