2 Replies Latest reply on Sep 30, 2007 11:19 AM by jrosskopf

    How to declare navigation from ajax method with args?

    statelessbean

      Hi,
      Can anyone help me to declare navigation in pages.xml if I got ajax method with arguments?

      Here is my method

      <a href="#" onclick="javascript:sendEmail('1');">


       public String sendEmail(String trajectory) {
       try {
      
       }
       catch (Exception e) {
       if (currentPerson != null) {
       log.error("User: (" + currentPerson.getUsername() +
       ") ->galaxyAction - email(String trajectory): " + e.getMessage());
       } else {
       log.error("User: (null) ->galaxyAction - email(String trajectory): " + e.getMessage());
       }
       }
       }
      


      and if my method has argument "trajectory"
      public String sendEmail(String trajectory)
      


      how shoud I declare pages.xml for change page to example /pages/email.xhtml?

      <navigation from-action="#{galaxyAction.sendEmail}">
       <redirect view-id="/pages/email.xhtml"/>
      </navigation>
      
      ???