How to get the ui:param value in Javabean
Posted
by mihaela
on Stack Overflow
See other posts from Stack Overflow
or by mihaela
Published on 2010-03-26T07:41:13Z
Indexed on
2010/03/26
7:43 UTC
Read the original article
Hit count: 399
Hello,
I am learning facelets and Seam and I'm facing the following problem: I'm have 2 xhtml files, one includes the other and each one has its own Seam component as backing bean. I want to send and object to the included facelet and obtain that object in the backing bean corresponding to the included facelet. I'll take an example to explain better the situation:
- registration.xhtml with Seam component as backing bean Registration.java. In this class I have an object of type Person
- address.html with Seam component as backing bean Address.java. In this class i want to obtain the Person object from the Registration component and set the address.
- registration.xhtml includes the address.xhtml and passes an object using
How to obtain this object in Address bean? Will be the same reference of the object from the Registration bean? is the solution of passing this object or there is another solution for that? (maybe f:attribute, but even in this case how do I obtain the object in bean)
This example is simple and not necessarily realistic but I have a similar problem and I don't know how to solve it.
Thanks in advance.
© Stack Overflow or respective owner