ibatis-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeff Butler (JIRA)" <ibatis-...@incubator.apache.org>
Subject [jira] Commented: (IBATIS-608) Add Propertychangelistener support
Date Mon, 15 Jun 2009 18:24:07 GMT

    [ 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.


Mime
View raw message