3 Replies Latest reply on Apr 7, 2008 1:49 PM by fabulous

    oncomplete action occurs even after valitation failed

    fabulous

      Hi, everybody.

      I've just coped with such kind of problem: I have a form with some fields and button(a4j:commandButton).I placed a validator inside a text box component. My button has an oncomplete attribute where the new rich:modalPanel will be full-screen displayed.It also has a rerender attribute which is supposed to update the view of that form. So the problem is: even after a validation failed oncomplete action will be performed and the new form will be displayed. But I want oncomplete action not being inplemented if there is a wrong value in the edit box... So If there are any ways to resolve this bottleneck? Please help me.

      <rich:messages style="color:red" showDetail="true" styleClass="error"/>

      <h:inputText id="vin" value="#{jobTicketBB.vehicle.vin}">
      <f:validator validatorId="VinValidator"/>
      </h:inputText>

      <a4j:commandButton action="#{jobTicketBB.configureSelectVehiclePage}"
      reRender="jobTicketModalPanel" actionListener="#{jobTicketModalFormSupportBB.openVehiclePage}"
      oncomplete="showModal('jobTicketMain', 'jobTicketModal')"
      value="#{jobTicketMsg}"/>