1 Reply Latest reply on Sep 4, 2010 10:14 AM by njrich28

    Navigation and action param - navigation rule dosen't work

    mireksz.m.szajowski.streamsoft.pl

      Hello ,
      I have simple action




      public class ExampleComponent{
       public String simpleAction(String name){
        return "success"
       }
      
      }
      in my pages.xml
      <navigation from-action="#{exampleComponent.simpleAction}" >
         <rule if-outcome="success" >
           <redirect view-id="/home" >
           </redirect>
         </rule>
      </navigation>
      



      When I invoke this action by



      <a4j:commandButton action="#{exampleComponent.simpleAction('test')">sad</a4j:commandButton>


      It dosen't work
      How to resolve this problem. When I remove action param everything works fine


      Best regards



        • 1. Re: Navigation and action param - navigation rule dosen't work
          njrich28

          Try putting the brackets on the function call in pages.xml and make sure that all your view-ids reference the full file name (including .xhtml extention [or .jsp])


          <page view-id="/page-containing-link.xhtml">
          <navigation from-action="#{exampleComponent.simpleAction()}" >
             <rule if-outcome="success" >
               <redirect view-id="/home.xhtml" >
               </redirect>
             </rule>
          </navigation>
          </page>



          also make sure that the link is on the page named in the view-id attribute in the page tag