On 1/26/07, Paul Spencer <[EMAIL PROTECTED]> wrote:
Rahul Akolkar wrote:
<snip/>
>
> As mentioned above, that would be inside the method called by the MB,
> if at all we wanted to stop an active dialog and delegate to the
> faces-config navigation.
>

What is the name of the method, or where do I configure it, that is
called when the outcome, does is not configured?

In the above example page's header/footer define the outcomes "home",
"logout", and "menu".  These outcomes are currently handled by
faces-config.xml, and I agree with your statement about avoiding the
modeling of "global" site navigation in each dialog.

<snap/>

Lets say outcome "home" is actually a commandLink, so simplistically:

<h:commandLink action="home" value="Home" />

This, by itself, would mess with an active dialog. Instead:

<h:commandLink action="#{globals.home}" value="Home" />

would ensure that we clean up correctly if there is an active dialog, where:

// In the managed bean "globals" --

public String home() {

 stopActiveDialogIfAny(); // the two lines of code from before

 return "home";  // faces-config nav rules takes over here
}

Similarly for "logout" and "menu". Also may want to check with user
via onclick or suitable event handlers before wiping out the dialog.

-Rahul

Reply via email to