This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JSF and the fly likes assignment operator Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "assignment operator" Watch "assignment operator" New topic

assignment operator

Higgledy Smith
Ranch Hand

Joined: Mar 07, 2006
Posts: 192
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,
Rorco Reggz

Joined: Jul 21, 2009
Posts: 8
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

Joined: Mar 07, 2006
Posts: 192
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.
I agree. Here's the link:
subject: assignment operator
Similar Threads
what is wrong with i = i++;
if(b = i == j) => Valid ??
Tricky assignment i=i++;
about ++ ??
Why is this printing 1,0 instead of 1,1