4 Replies Latest reply on Jun 3, 2009 5:59 AM by ilya_shaikovsky

    On Richface TabPanel, validation not happening on previous t

      Hi,

      I have a Richfaces TabPanel with 2 Tabs. On the first tab i have "Required" Input field.

      Please find the sample code below:

      <a4j:form>
      <rich:tabPanel id="maintab" immediate="true" >

      <rich:tab label="1" switchType="ajax">
      <h:inputText required="true" requiredMessage="Fill this" />
      </rich:tab>
      <rich:tab label="2" switchType="ajax">
      <h:outputText value="fddfsgs" />
      </rich:tab>

      </rich:tabPanel>
      <a4j:commandButton value="OK" />
      </a4j:form>

      We have at present set immediate="true" on the TabPanel so that we can easily switch between the tabs without interrupted by any validations.

      Issue is while we are on the second tab, we perform Submit, validation for the Mandatory field on the first tab doesn't take effect. (Actually the form is getting submitted with empty value).

      How can we enforce validations on all the Tabs on Submit?

      Thanks in advance for the reply.