1 Reply Latest reply on Jul 6, 2008 10:19 PM by Samuel Mendenhall

    s:decorate and a:commandButton

    Arisson Leal Newbie

      When i put a

      <a:commandButton>

         my fields with the
      <s:decorate>

      don't work. If i change the
      <a:commandButton>

      for a
      <h:commandButton>

      it works fine!!


      What could i do to fix this ?

        • 1. Re: s:decorate and a:commandButton
          Samuel Mendenhall Apprentice

          <a:commandButton> does work, but sometimes it can appear not too depending on how you are using it.  Make sure it is enclosed in a <h:form> but you probably already have that since h:commandButton works.  Other things to remember, it does not refresh the whole page, it does a partial page refresh.


          So, bind the action to something method that logs a line, get that working first, then bind it as you need to.  And, the majority of the time, a:commandButton will have a reRender to update a section of the JSF that will change as a result of the action.




          <a:commandButton value="Click me" action="#{searchAction.search}" reRender="peopleTable" />
          
          <h:dataTable id="peopleTable" .../>