On 1/12/06, Garner, Shawn <[EMAIL PROTECTED]> wrote:
>
> I want to use a link in one view page to go to another view without going
> through a bean action.


That's actually pretty easy ... the thing you enter for the "action"
attribute can be either a method binding to a bean action, or a literal
outcome string that is fed directly to the navigation system:

    <h:commandLink ... action="#{bean.action}"/>

or

    <h:commandLink ... action="foo"/>

In the latter case, JSF acts exactly like you had called a no-op action that
returned "foo" as the outcome.  This gets fed into the navigation rules in
the usual way.

Craig

PS:  This trick is also quite useful as you are originally constructing your
application ... you can create the page with literal actions for hard coded
navigation until you get around to actually writing the bean actions, at
which point you would change to using the appropriate binding expression.

Reply via email to