2 Replies Latest reply on Mar 17, 2009 11:18 AM by josief

    Avoid form validation

    josief

      Hi,


      I'm having a problem trying to avoid form validation.


      I have a form with some required h:inputText.
      I also have a h:selectOneRadio that aims to hide some of the input texts depending on the value of the radio button.


      When I click on the h:selectOneRadio to change the value, the ajax validation avoids my action to be performed. The h:inputText displays The value is required.


      How to avoid the ajax validation?


      My code:


      <h:selectOneRadio value="#{subjectHome.alreadyAnonymized}">
        <f:selectItem itemValue="#{true}" itemLabel="#{msg['inrianeurotk.model.constants.yesno.yes']}" />
           <f:selectItem itemValue="#{false}" itemLabel="#{msg['inrianeurotk.model.constants.yesno.no']}" />
           <a4j:support event="onchange" reRender="createSubjectForm" />
       </h:selectOneRadio>
      <a4j:region id="firstNameRegion" rendered="#{!subjectHome.managed and !subjectHome.alreadyAnonymized}">
        <s:decorate id="firstNameDecorate" template="../template/editWithoutPassedImg.xhtml">
          <ui:define name="label">#{msg['inrianeurotk.manageData.create.new.subject.firstName']}:</ui:define>
           <h:inputText id="firstName" required="false" size="40"  maxlength="63" styleClass="ajaxSupport" tabindex="1"
                value="#{subjectHome.firstName}" redisplay="true">
                   <a4j:support event="onblur" reRender="firstNameDecorate" />
           </h:inputText>
        </s:decorate>
      </a4j:region>



      Any help would be very appreciated!


      Thanks


      Adrien