Hi,

I have such construct:

<h:selectOneRadio value="#{doc.passed}" id="review" onchange="swap_state('test#{index}', this)">
<f:selectItem itemValue="#{true}" itemLabel="pass" id="passRadio"/>
<f:selectItem itemValue="#{false}" itemLabel="fail" id="failRadio"/>
</h:selectOneRadio>

I need to generate HTML, where each radio button will have different
onchange.

<label><input type="radio" value="pass" name="test_radio1" onchange="swap_explanation_state('test1', this)" /> pass</label> <label><input type="radio" value="fail" name="test_radio1" onchange="swap_explanation_state('test1', ! this)" /> fail</label>

But I don't see a way, how to achieve it. The onchange attribute
is available only for selectOneRadio container, not for selectItems.
Can I somehow parameterize onchange for each selectItem?

Thank you for your ideas

Leos

Reply via email to