You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ibatis.apache.org by "Jeff Butler (JIRA)" <ib...@incubator.apache.org> on 2009/06/15 20:24:07 UTC

[jira] Commented: (IBATIS-608) Add Propertychangelistener support

    [ https://issues.apache.org/jira/browse/IBATIS-608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12719683#action_12719683 ] 

Jeff Butler commented on IBATIS-608:
------------------------------------

Are you requesting this feature for Ibator?  If so, you could easily implement this yourself with an Ibator plugin.

> Add Propertychangelistener support
> ----------------------------------
>
>                 Key: IBATIS-608
>                 URL: https://issues.apache.org/jira/browse/IBATIS-608
>             Project: iBatis for Java
>          Issue Type: New Feature
>          Components: Tools
>            Reporter: joseph olson
>   Original Estimate: 144h
>  Remaining Estimate: 144h
>
> Propertychangelistener support is needed for a ibatis javabean will work with JavaBeans binding
> For each property setting I have been adding this code:
> public void setPrimarykey(Integer primarykey) {
>    final Integer old = this.primarykey;
>    this.primarykey = primarykey;
>    propertyChangeSupport.firePropertyChange("primarykey", old, primarykey);
> }
> Near the top I add this:
> 	private final PropertyChangeSupport propertyChangeSupport = 
> 		new PropertyChangeSupport(this);
> And at the bottom of a javabean I have been adding this code:
> 	public void addPropertyChangeListener(PropertyChangeListener l){
> 		propertyChangeSupport.addPropertyChangeListener(l);
> 	}
> 	public void addPropertyChangeListener(String name, PropertyChangeListener l){
> 		propertyChangeSupport.addPropertyChangeListener(name, l);
> 	}
> 	public void removePropertyChangeListener(PropertyChangeListener l){
> 		propertyChangeSupport.removePropertyChangeListener(l);
> 	}
> 	public void removePropertyChangeListener(String name, PropertyChangeListener l){
> 		propertyChangeSupport.removePropertyChangeListener(name,l);
> 	}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.