Hello Chrisi,
what you need is to use <h:commandLink> instead of simple link
on page2, write a navigation case from page1 to page2 and then either:
a) Write an action method for the backing bean of page2, which
sets the "controller.name" property, or
b) Use the Tomahawk <t:updateActionListener> extension, as in this:
<h:commandLink value="Go to page 2" action="goPage1">
<t:updateActionListener property="#{controller.name}" value="Chrisi" />
</h:commandLink>
Regards
Mirek
Chrisi wrote:
Hello,
this is a beginner question:
I have two java server faces pages.
Nr.1 'page1.faces': Contains just a simple form with an input-field
like the following
<h:inputText value="#{controller.name <http://controller.name>}"/
Nr.2 'page2.faces': Should contain a simple link to 'page1.faces'.
When clicking on
the link, a value like 'Chrisi' should be transfert to the text-field
and page1.faces should
be rendered.
What is the JSF way to do this right?
Sure, I can do something like this <a href="page1.faces?name=Chrisi"> and
let the page1.faces check the parameter 'name' using EL.
But there should be a better way using the JSF lifecycle and the
controller/modell concept, right?
--
Thanks and Greetings
Chrisi