1 Reply Latest reply on Nov 27, 2008 10:41 AM by Nick Belaevski

    selectOneMenu reRendered required validation not firing

    Anne Childress Newbie

      I have a selectOneMenu that is reRendered when a selection is made in another selectOnemenu. The selectOneMenu that is reRendered has a rendered attribute so that it doesn't display until a selection is made in the related selectOneMenu. The problem is that once it is rendered, the value of the second selectOneMenu is never submitted and the required validation is never fired for it. Is there some way around this?

      <h:selectOneMenu id="comCountyCombo" label="Committing County" required="true"
       requiredMessage="Committing County: Value is required."
       <a4j:support event="onchange" reRender="zoneddarea"/>
      <a4j:outputPanel id="zoneddarea">
       <h:selectOneMenu id="diagZoneCombo" label="Zone" required="true"
       requiredMessage="Zone: Value is required."
       rendered="#{DCCPPOAssignmentsBean.committingCounty != ''}">

      When a selection is made on comCountyCombo, then zoneddarea is reRendered (zoneddarea is an a4j:outputPanel that contains the second selectOneMenu that should not be displayed until a selection is made from the first selectOneMenu). Then, when a selection is made on diagZoneCombo and the page is submitted, the value of the selected diagZoneCombo item is not submitted AND required validation is completely skipped. The backing bean is in request scope. Is the scope the problem?