Paul, this should work, although I'd expect some issues with
cross-validation.  Ie, i'd put the checkbox in a subForm so you can
toggle it even when the list is required.   Immediate=true might be
enough in this particular case depending on the rest of your page,
though.

You didn't really describe what is not working the way you expect it to work.


On 4/26/07, Paul Spencer <[EMAIL PROTECTED]> wrote:
I have two properties on a form.  The first property is Boolean and the second 
property is list.  If the first
property, includeAllSignals, is false, then the second property, 
selectedSignals, is required.  The
validation of the second property fails when the first property goes from false 
to true.

<h:panelGroup>
   <h:selectOneRadio id="includeAllSignals"
         value="#{manager.includeAllSignals}"
         valueChangeListener="#{manager.changeIncludeAllSignals}"
        onclick="submit();">
     <f:selectItem itemValue="#{true}" itemLabel="All" />
        <f:selectItem itemValue="#{false}" itemLabel="Selected" />
     </h:selectOneRadio>
     <t:selectManyCheckbox id="selectedSignals"
         value="#{manager.signals}"
        rendered="#{!manager.includeAllSignals}"
        required="#{!manager.includeAllSignals}">
       <f:selectItems value="#{manager.signalList}" />
     </t:selectManyCheckbox>
   </h:panelGroup>

Note: The second property is not rendered when the first property is true. This 
works
       as expected.

Any ideas how to force the validation to use the new value of the first 
property when
the first value changes?

Paul Spencer

Reply via email to