0 Replies Latest reply on May 5, 2008 5:48 AM by Thai Dang Vu

    Howto not reRender a component when validation failed?

    Thai Dang Vu Apprentice

      Inside an a4j:form, I have an a h:inputText, an a4j:commandButton and a rich:dataTable.

      <a4j:form id="form1">
       <h:inputText value="${someBean.s}" required="true" id="name"/><h:message for="form1:name"/>
       <a4j:commandButton value="Add" action="${someBean.add}" reRender="form1:dataTable"/>
       <rich:dataTable id="dataTable" .....>
      </a4j:form>

      At this time, a click on the button always re-renders the rich:dataTable even when the h:inputText is empty (i.e. the validation phase failed).

      How can I make the rich:dataTable not be re-rendered when the validation fails or when I catch an exception in the someBean.add method