I got a TextBox with a validator and a commandbutton. When the validation of the textbox fails I want to disable the commandbutton otherwise it should be enabled. I don't want to use any codebehind so it should be working without any helper properties in the bean.
So how can I tell the commandbutton to be disabled/enabled depending on the validator state?
  <h:outputLabel for="category" value="#{msg['category.create']}"/>
                    <h:inputText id="category" required="true"  label="#{msg['category.create']}" value="#{CreateCategoryBean.newCategory.name}" >
                        <f:validator validatorId="Get.Validator.CategoryValidator" />
                        <f:ajax event="keyup" render="categorymessage"  />
                    </h:inputText>
                    <h:messages for="category" id="categorymessage"/>
                    <h:commandButton id="submit" value="#{msg['default.create']}" action="#{CreateCategoryBean.CreateCategory()}"
 
     
    