You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by Scott Warner <sw...@adcc.com> on 2006/11/03 22:00:35 UTC

Abator - option for generating propert change event code

Can an option be added to the javaModelGenerator that will generate the 
code for property change events in the generated setters?
For example:
    public void setName(String name) {
            String prev = getName();
            pda.setName(name);
            firePropertyChange("name", prev, name);
     }

and then also support for vetoeable property change events (I just 
thought of this)

We are going to start using a binding framework so this will be 
extremely useful.

Scott Warner


Re: Abator - option for generating propert change event code

Posted by Jeff Butler <je...@gmail.com>.
It would be pretty easy for you to implement this yourself.  You could write
a class that extends one of the JavaModelGenerator classes, and then
override the "generateClassParts" method - that method generates the
getters/setters.

Jeff Butler



On 11/3/06, Scott Warner <sw...@adcc.com> wrote:
>
>
> Can an option be added to the javaModelGenerator that will generate the
> code for property change events in the generated setters?
> For example:
>    public void setName(String name) {
>            String prev = getName();
>            pda.setName(name);
>            firePropertyChange("name", prev, name);
>     }
>
> and then also support for vetoeable property change events (I just
> thought of this)
>
> We are going to start using a binding framework so this will be
> extremely useful.
>
> Scott Warner
>
>