Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

assignment operator

 
Higgledy Smith
Ranch Hand
Posts: 192
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In JSF, is there an assignment operator? For instance, the user inputs a value with this bit of code:


Now that I have the user's value, I want to assign that value to another object. Can I do something like this?



After this line is executed both objects will contain the same value?

Thank you,
higgledy
 
Rorco Reggz
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not sure about the assignment operator. You can probably do it like this:


The beans (minus the imports) look like this:


On the other hand: why not doing the assignment from the backing bean?
 
Higgledy Smith
Ranch Hand
Posts: 192
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Roroco. I can't do the assignment in the backing bean beacuse they are different objects, neither has access to the other's instance object. ...unless you know a way that I am not thinking about.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic