File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "assignment operator" Watch "assignment operator" New topic
Author

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,
higgledy
Rorco Reggz
Greenhorn

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.
 
 
subject: assignment operator
 
Similar Threads
what is wrong with i = i++;
Why is this printing 1,0 instead of 1,1
about ++ ??
Tricky assignment i=i++;
if(b = i == j) => Valid ??