You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Srikanth Madarapu <sr...@senior-systems.com> on 2005/03/31 16:18:19 UTC

navigation from more than one view

Hi

   How can I define the navigation rule so that I can navigate to a page from two different pages/views.

My current navigation rule is...

    <navigation-rule>
        <from-view-id>/constituent/profile/viewProfile.jsp</from-view-id>
        <navigation-case>
            <from-outcome>manageAddress</from-outcome>
            <to-view-id>/constituent/profile/manageAddress.jsp</to-view-id>
            <redirect />
        </navigation-case>
    </navigation-rule>

I would like to get to the same page from another view so I tried the following but it didn't worked.

    <navigation-rule>
        <from-view-id>/constituent/profile/viewProfile.jsp</from-view-id>
        <from-view-id>/constituent/profile/spouseProfile.jsp</from-view-id>
        <navigation-case>
            <from-outcome>manageAddress</from-outcome>
            <to-view-id>/constituent/profile/manageAddress.jsp</to-view-id>
            <redirect />
        </navigation-case>
    </navigation-rule>

I know that I can use "*" instead of a specific "From view", but I don't want to do that. I want to only to allow to navigate to this from the specific view I define in the rule.

Thanks in advance

-Srikanth Madarapu


Re: navigation from more than one view

Posted by Heath Borders <he...@gmail.com>.
You have to make two separate navigation rules, like so:

   <navigation-rule>
       <from-view-id>/constituent/profile/viewProfile.jsp</from-view-id>
       <navigation-case>
           <from-outcome>manageAddress</from-outcome>
           <to-view-id>/constituent/profile/manageAddress.jsp</to-view-id>
           <redirect />
       </navigation-case>
   </navigation-rule>

   <navigation-rule>
       <from-view-id>/constituent/profile/spouseProfile.jsp</from-view-id>
       <navigation-case>
           <from-outcome>manageAddress</from-outcome>
           <to-view-id>/constituent/profile/manageAddress.jsp</to-view-id>
           <redirect />
       </navigation-case>
   </navigation-rule>

I personally prefer using a generic rule because it makes for less
duplication, in your xml.


On Thu, 31 Mar 2005 17:53:32 +0200, Bruno Aranda <br...@gmail.com> wrote:
> You can just use a generic navigation rule like this one:
> 
> <navigation-rule>
>          <navigation-case>
>                        <from-outcome>manageAddress</from-outcome>
>                        <to-view-id>/constituent/profile/manageAddress.jsp</to-view-id>
>                </navigation-case>
> </navigation-rule>
> 
> Bruno
> 
> On Thu, 31 Mar 2005 09:18:19 -0500, Srikanth Madarapu
> <sr...@senior-systems.com> wrote:
> > Hi
> >
> >    How can I define the navigation rule so that I can navigate to a page from two different pages/views.
> >
> > My current navigation rule is...
> >
> >     <navigation-rule>
> >         <from-view-id>/constituent/profile/viewProfile.jsp</from-view-id>
> >         <navigation-case>
> >             <from-outcome>manageAddress</from-outcome>
> >             <to-view-id>/constituent/profile/manageAddress.jsp</to-view-id>
> >             <redirect />
> >         </navigation-case>
> >     </navigation-rule>
> >
> > I would like to get to the same page from another view so I tried the following but it didn't worked.
> >
> >     <navigation-rule>
> >         <from-view-id>/constituent/profile/viewProfile.jsp</from-view-id>
> >         <from-view-id>/constituent/profile/spouseProfile.jsp</from-view-id>
> >         <navigation-case>
> >             <from-outcome>manageAddress</from-outcome>
> >             <to-view-id>/constituent/profile/manageAddress.jsp</to-view-id>
> >             <redirect />
> >         </navigation-case>
> >     </navigation-rule>
> >
> > I know that I can use "*" instead of a specific "From view", but I don't want to do that. I want to only to allow to navigate to this from the specific view I define in the rule.
> >
> > Thanks in advance
> >
> > -Srikanth Madarapu
> >
> >
> 


-- 
-Heath Borders-Wing
hborders@mail.win.org

Re: navigation from more than one view

Posted by Bruno Aranda <br...@gmail.com>.
You can just use a generic navigation rule like this one:

 <navigation-rule>
          <navigation-case>
			<from-outcome>manageAddress</from-outcome>
			<to-view-id>/constituent/profile/manageAddress.jsp</to-view-id>
		</navigation-case>
</navigation-rule>

Bruno

On Thu, 31 Mar 2005 09:18:19 -0500, Srikanth Madarapu
<sr...@senior-systems.com> wrote:
> Hi
> 
>    How can I define the navigation rule so that I can navigate to a page from two different pages/views.
> 
> My current navigation rule is...
> 
>     <navigation-rule>
>         <from-view-id>/constituent/profile/viewProfile.jsp</from-view-id>
>         <navigation-case>
>             <from-outcome>manageAddress</from-outcome>
>             <to-view-id>/constituent/profile/manageAddress.jsp</to-view-id>
>             <redirect />
>         </navigation-case>
>     </navigation-rule>
> 
> I would like to get to the same page from another view so I tried the following but it didn't worked.
> 
>     <navigation-rule>
>         <from-view-id>/constituent/profile/viewProfile.jsp</from-view-id>
>         <from-view-id>/constituent/profile/spouseProfile.jsp</from-view-id>
>         <navigation-case>
>             <from-outcome>manageAddress</from-outcome>
>             <to-view-id>/constituent/profile/manageAddress.jsp</to-view-id>
>             <redirect />
>         </navigation-case>
>     </navigation-rule>
> 
> I know that I can use "*" instead of a specific "From view", but I don't want to do that. I want to only to allow to navigate to this from the specific view I define in the rule.
> 
> Thanks in advance
> 
> -Srikanth Madarapu
> 
>