0 Replies Latest reply on Nov 26, 2007 9:31 PM by Madhav Inamti

    page navigation issue....

    Madhav Inamti Novice

      This is what I have ....

      Clicking on 'hello' navigates to newPage whereas clicking on 'world'
      does not navigate to newPage. Any ideas...

      Thanks,
      M

      Detail.xhtml

      <s:decorate id="button" template="layout/edit.xhtml">
       <div class="navBar">
       <h:commandButton value="Hello" action="#{test.hello}" rendered="#{test.renderHello}" view="/test2.xhtml"/>
       <h:commandButton value="World" action="#{test.world}" rendered="#{test.renderWorld}" view="/test2.xhtml"/>
       </div>
      </s:decorate>
      


      Test.java

      @Name("test")
      public class Test {
      
       public boolean getRenderHello() {
       return true;
       }
      
       public boolean getRenderWorld() {
       return true;
       }
      
       public void hello() {
       System.out.println("hello");
       }
      
       public void world() {
       System.out.println("world");
       }
      }
      


      pages.xml

      <page....>
       <navigation from-action="#{test.hello}">
       <redirect view-id="/newPage.xhtml"/>
       </navigation>
       <navigation from-action="#{test.world}">
       <redirect view-id="/newPage.xhtml"/>
       </navigation>
      </page>