Hello Mirek,

thanks for clarification!

I tried to use the h:commandLink and run into a second question. ;)

page2 is a jsp-file that is stored inside the WEB-INF directory.
When clicking on the generated link of the commandLink-component I get the follwing
404-error:   /testapp/WEB-INF/dir/page2.faces  - The requested resource is not available.

Does this mean, that hidden jsp-files  inside WEB-INF couldn't be used for a Faces-request?

My navigation rule looks like this:

<navigation-rule>
  <from-view-id>/page1.jsp<from-view-id>
  <navigation-case>
     <from-outcome>success</from-outcome>
      <to-view-id>/WEB-INF/dir/page2.jsp</to-view-id>
   </navigation-case>
</navigation-rule>

I tried a second navigation-rule back from page2 to page1, but the error-message remains?
Is a second navigation-rule necessary or is the "WEB-INF" the problem?

Thanks again!
 Chrisi

On 5/10/06, Mirek B. <[EMAIL PROTECTED]> wrote:
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=""
   <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="" 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





Reply via email to