On 2/27/07, Mike Kienenberger <[EMAIL PROTECTED]> wrote:
Simon,

I don't have any JSF books handy.  What's the difference between
from-action and from-outcome?   I thought outcome was the string
returned from an action method?

You can use either or both.

* <from-action> describes the EL expression that triggered
 calling your action.  This is useful if you have multiple buttons
 on the form, bound to different actions.  (It's also legal to
 have more than one command component bound to the same
 action method ... for example, a "next page" or "previous page"
 link at both the top and bottom of a long page.

* <from-outcome> describes the logical outcome returned by
 whatever action was invoked.  This is useful if you want to
 go different places depending on what happened inside an action.

If you use just <from-action>, your navigation rule is triggered
whenever that action is executed, no matter what outcome was returned.
If you use just <from-outcome>, your navigation rule is triggered
when that outcome is returned by any action that was processed.  Or,
you can use them together to define more precisely when this
navigation should be triggered.

Craig



On 2/27/07, Simon Kitching <[EMAIL PROTECTED]> wrote:
> Mike Kienenberger wrote:
> > By the way,
> >
> > I don't think this is legal:
> >
> > <from-action>#{ userBackingBean.prepareForEdit}</from-action>
> >
> > If it is legal, I doubt that's the correct syntax.
>
> Yep. The from-action value is meant to match the string *returned* from
> an action method. It is not an EL expression.
>
> I suggest you find a good JSF book and read the section on navigation.
>
> Regards,
>
> Simon
>

Reply via email to