NetBeans Forums
| View previous topic :: View next topic |
| Author |
Message |
ChrisNY
Joined: 25 Jun 2009 Posts: 7
|
Posted: Sat Aug 14, 2010 8:52 am Post subject: 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....
Thanks |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|