1 Reply Latest reply on Aug 19, 2008 7:25 PM by Samuel Mendenhall

    custom facelet tag and pages.xml navigation

    David D Newbie

      Hi,
      I am trying to define a custom facelets tag following some tutorials (mostly http://www.seamframework.org/Documentation/CompositeButtons). So this is my template:


      <ui:composition ...>
          <h:commandButton action="#{backingBean[method]}" value="mytext"/>
      </ui:composition>
      



      included like this


      <mytags:button backingBean="#{myBean}" method="myMethod"/>
      



      well, this is calling the right method but my problem is the navigation in pages.xml. As related in the bug JBSEAM-2362, the equal test is on the strings. Then


      this is working:

      <navigation from-action="#{backingBean[method]}">
          ...
      </navigation>
      



      this is NOT working:

      <navigation from-action="#{myBean[myMethod]}">
          ...
      </navigation>
      



      And then this is a quite big problem for me. Is there any workaround for this or am i missong something ?


      Thanks


      David

        • 1. Re: custom facelet tag and pages.xml navigation
          Samuel Mendenhall Apprentice

          I can't provide too much input other than to say at first appearance your assertions appear to be correct:



          In JSF code:


          NavigationHandlerImpl.java
          private CaseStruct determineViewFromActionOutcome(List<ConfigNavigationCase> caseList,
                                                                String fromAction,
                                                                String outcome) {
          
          String cncFromAction = cnc.getFromAction();
          ....
          if ((cncFromAction.equals(fromAction)) ....
          
          
          ConfigNavigationCase.java: 
           public String getFromAction() {
                  return (this.fromAction);
              }



          Specifically the line:



          cncFromAction.equals(fromAction)