Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Invalid
-
Affects Version/s: 1.7.2
-
Fix Version/s: None
-
Component/s: ICE-Components
-
Labels:None
-
Environment:Windows XP, Tomcat 6, both IE 6 and Firefox 2
Description
When using an ice:selectOneRadio with layout="spread", there is an inconsistency when using ice:radio tags. Note the differences in the input tag ids.
<ice:selectOneRadio id="alphaRadio" value="#{bean.alphaValue}" layout="spread">
<f:selectItems value="#{bean.alphaItems}"/>
</ice:selectOneRadio>
<!-- Produces -->
<td>
<input id="alphaRadio:_1" type="radio" value="ABC" name="alphaRadio" checked="checked"/>
<label class="iceSelOneRb" for="alphaRadio:_1">ABC</label>
</td>
<td>
<input id="alphaRadio:_2" type="radio" value="XYZ" name="alphaRadio" checked="checked"/>
<label class="iceSelOneRb" for="alphaRadio:_1">XYZ</label>
</td>
-----------------------------------------------------------------------------------------
<ice:selectOneRadio id="alphaRadio" value="#{bean.alphaValue}" layout="spread">
<f:selectItems value="#{bean.alphaItems}"/>
</ice:selectOneRadio>
<ice:radio for="alphaRadio" index="0"/>
<ice:radio for="alphaRadio" index="1"/>
<!-- Produces -->
<span>
<input id="alphaRadio:_0" type="radio" value="ABC" onfocus="setFocus(this.id);" onblur="setFocus('');" name="alphaRadio"/>
<label for="alphaRadio:_0">ABC</label>
</span>
<span>
<input id="alphaRadio:_1" type="radio" value="XYZ" onfocus="setFocus(this.id);" onblur="setFocus('');" name="alphaRadio"/>
<label for="alphaRadio:_1">XYZ</label>
</span>
<ice:selectOneRadio id="alphaRadio" value="#{bean.alphaValue}" layout="spread">
<f:selectItems value="#{bean.alphaItems}"/>
</ice:selectOneRadio>
<!-- Produces -->
<td>
<input id="alphaRadio:_1" type="radio" value="ABC" name="alphaRadio" checked="checked"/>
<label class="iceSelOneRb" for="alphaRadio:_1">ABC</label>
</td>
<td>
<input id="alphaRadio:_2" type="radio" value="XYZ" name="alphaRadio" checked="checked"/>
<label class="iceSelOneRb" for="alphaRadio:_1">XYZ</label>
</td>
-----------------------------------------------------------------------------------------
<ice:selectOneRadio id="alphaRadio" value="#{bean.alphaValue}" layout="spread">
<f:selectItems value="#{bean.alphaItems}"/>
</ice:selectOneRadio>
<ice:radio for="alphaRadio" index="0"/>
<ice:radio for="alphaRadio" index="1"/>
<!-- Produces -->
<span>
<input id="alphaRadio:_0" type="radio" value="ABC" onfocus="setFocus(this.id);" onblur="setFocus('');" name="alphaRadio"/>
<label for="alphaRadio:_0">ABC</label>
</span>
<span>
<input id="alphaRadio:_1" type="radio" value="XYZ" onfocus="setFocus(this.id);" onblur="setFocus('');" name="alphaRadio"/>
<label for="alphaRadio:_1">XYZ</label>
</span>
Issue Links
- duplicates
-
ICE-3810 selectOneRadio/checkbox not keeping its value when layout=spread
- Closed
I can confirm this problem.
I use the following environment: