2 Replies Latest reply on Oct 5, 2007 11:12 AM by Heiko Dähn

    How can I disable a commandButton, depends on f: validation?

    Heiko Dähn Newbie

      Hello,

      In several situation I have the problem, that I can validate an input and show this in a message, but how can I disable/enable a commanButton.



      <h:inputText ...id="myInput" ... >
      <f:validateLength maximum="3" />
      </h:inputText>
      ...
      <rich:message for="tanowner" ... >
      <f:facet name="errorMarker">
      <h:graphicImage value="/images/error.gif" /> </f:facet>
      </rich:messge>
      ...
      <a4j:commandButton id="myButton" disable="???????" ...
      </a4j:commandButton>



      How can I manage this?
      Thx