2 Replies Latest reply on Sep 14, 2007 11:02 PM by Yurii Kartsev

    Display validation message after a4j:commandButton is presse

    Yurii Kartsev Apprentice

      Good afternoon.

      When I had my submit button as h:commandButton - the message was displayed("Value is required" in h:message). But when I've changed it to a4j:commandButton - it's not displaying. Is there anything I can do to leave it as a4j:commandButton and make it possible to display validation messages on the page?

      I have:

      <h:panelGroup>
       <font color="red">*</font>
       <h:outputText value="Tipul" />
      </h:panelGroup>
      
      <h:panelGroup>
       <h:selectOneMenu id="educationTypeEdit" required="true" value="#{amBean.education.educationTypeId}">
       <f:selectItems value="#{amBean.allTreeListMan.educationTypesSelectItems}"/>
       </h:selectOneMenu>
       <h:message style="color: red" for="educationTypeEdit"/>
      </h:panelGroup>
      
      ...
      
      <a4j:commandButton action="#{amBean.action4Education}" value="Adauga educatie"
       focus="educations_tab" reRender = "educationsTable">
      </a4j:commandButton>



      Thank you very much for your answer.