New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Observable property - feature request #78
Comments
An interesting thought, which I assume is for swing? I haven't used swing myself in a while, and adding this does add complexity, but it is a natural project extension. |
I had a look at doing this. It gets quite tricky relatively quickly. Joda-Beans has many different ways to generate a setter. In theory, to make this change work, all those ways would need a parallel observable version, and the current code structure isn't especially amenable to that. Making it work for just simple setters would not be too hard I suspect. |
Actually, I'm working with Vaadin which intensively uses "property" pattern for binding. Waiting forward for the next release with Listener support. |
Hi All, I'd like to second this request for use in Vaadin. I'd be glad to help any way I can. I'm assuming that it could be done via something in the generated setter, and perhaps defined with an annotation? @PropertyDefinition(validate = "notEmpty", notifyOnSet=true)
private String userId;
public void setUserId(String userId) {
JodaBeanUtils.notEmpty(userId, "userId");
this.userId = userId;
//this would have to be generated
firePropertyChange("userId");
}
''' |
Add basic support for bound properties Implementation only handles non-final properties See #78
Basic support for bound properties added, intended for simple mutable properties only:
The |
Hi
Would you please add "Observable property" feature by invoking firePropertyChange in generated setter method?
This also requires to generate addPropertyChangeListener and removePropertyChangeListener methods ,plus PropertyChangeSupport field.
This could be controlled by extending @PropertyDefinition with "observable=true" attribute.
Thanks
Alexander
The text was updated successfully, but these errors were encountered: