NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

Changing binding when changing the underlying model object

 
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Users
View previous topic :: View next topic  
Author Message
ChrisNY



Joined: 25 Jun 2009
Posts: 7

PostPosted: Sat Aug 14, 2010 8:52 am    Post subject: Changing binding when changing the underlying model object Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Users All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo