myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adam Winer" <awi...@gmail.com>
Subject Re: How to navigate on DisclosureEvent using a tr:showDetailItem
Date Tue, 04 Sep 2007 22:22:10 GMT
Remove <from-action>.  There is no action here (you passed
null to the NavigationHandler!), just an outcome.

-- Adam


On 9/4/07, Rakesh Patnaik <rakesh.patnaik9@gmail.com> wrote:
> Hi,
> my application has a panel accordion component and I need to navigate to
> different pages on disclosure of each of the showDetailItem's that it holds.
> For example:
>                    <tr:panelAccordion discloseNone="true">
>
>                         <tr:showDetailItem text="PA1"
> disclosureListener="#{backingBean.navigateToAppPage}">
>                             <tr:outputText value="detail1"/>
>                         </tr:showDetailItem>
>
>                         <tr:showDetailItem text="PA2"
> disclosureListener="#{backingBean.navigateToMgmtPage}">
>                             <tr:outputText value="detail2"/>
>                         </tr:showDetailItem>
>
>                     </tr:panelAccordion>
>
> I tried using NavigationHandler code in the backing bean methods as follows:
>
>  public void navigate(DisclosureEvent de){
>         try{
>             NavigationHandler navigator =
> FacesContext.getCurrentInstance().getApplication().getNavigationHandler();
>             navigator.handleNavigation ( FacesContext.getCurrentInstance(),
> null, "xyz" );
>             FacesContext.getCurrentInstance().renderResponse();
>           }
>           catch(Exception e){.....}
>
> "xyz" is a navigation outcome definition:
>     <navigation-rule>
>         <navigation-case>
>             <from-outcome>xyz</from-outcome>
>             <from-action>xyz</from-action>
>             <to-view-id>/TestNavigation.jsp</to-view-id>
>             <redirect/>
>         </navigation-case>
>     </navigation-rule>
>
>
> but this doesnot work.
>
> Any suggestions as to how to achieve this navigation?
>
>

Mime
View raw message