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

    On Richface TabPanel, validation not happening on previous t

    Paskal Sanil Newbie


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

      Please find the sample code below:

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

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

      <a4j:commandButton value="OK" />

      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.