Results 1 to 1 of 1
- 08-14-2010, 11:09 AM #1Member
- Join Date
- Aug 2010
- Rep Power
Changing binding when changing the underlying model object
I make a form, to display & edit user information, say "userForm". The form contains an underlying user object model "user", and binds, for example, JTextField userName to the underlying field of the user model, user.name.
However, when a new user is selected, and I call "userForm.setUser(user2);", I would like obviously to bind the JTextField userName to the new user model member of userForm, but of course the bindings stay attached to the original user model object.
Is there any straightforward way to change the bindings generated from Netbeans? I could do it all manually by adding and removing listeners in the setUser method, but I'm hoping for something more elegant and straightforward. It must be a common use case....
- By ridvan in forum AWT / SwingReplies: 2Last Post: 06-27-2010, 05:11 AM
- By nvts in forum NetBeansReplies: 1Last Post: 05-06-2010, 01:36 AM
- By flok in forum AWT / SwingReplies: 3Last Post: 01-23-2010, 03:44 PM
- By higuchi in forum New To JavaReplies: 1Last Post: 03-19-2009, 08:29 AM
- By Nemo1959 in forum New To JavaReplies: 13Last Post: 09-19-2008, 04:58 PM