Hi Kohsuke,
I haven't filed an issue on this, but have just had the requirement
again, I'm assuming that your previous response is still relevant and
I should file an issue - could you confirm or correct this please?
cheers
dim
On 10/22/05, Kohsuke Kawaguchi <kohsuke.kawaguchi_at_sun.com> wrote:
>
> Sorry for a delay.
>
> Dmitri Colebatch wrote:
> > Hi,
> >
> > I'd like to generate beans that have PropertyChangeListener support,
> > that is have addPropertyChangeListener(PropertyChangeListener
> > pcl)/removePropertyChangeListener(PropertyChangeListener pcl) methods.
> >
> > I'm looking through the source to ImplStructureStrategy which seems to
> > be what I need to be hooking into, but I don't see how I can get in to
> > fire PropertyChangeEvents.
> >
> > Surely I'm not the first person to have this requirement? Does anyone
> > have any guidance on how to hook into this area?
>
> For plugins to do this, I think I need to open up more of the code
> generation process to plugins, for example so that you can inject code
> into the setter method. This is also useful for other purposes, such as
> injecting code to check the int value against facets, etc.
>
> I'll see what I can do. You are welcome to file an issue to track the
> progress of this.
>
> Regarding your PropertyChangeListener, it would be somewhat difficult to
> fire an event for a change to List, as it happens outside the knowledge
> of JAXB.
>
> --
> Kohsuke Kawaguchi
> Sun Microsystems kohsuke.kawaguchi_at_sun.com
>
>
>