Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.1.10
-
None
-
Mojarra 2.0.3, Tomcat 6.0.29, Eclipse 3.6, Windows XP
Description
The f:ajax doesn't work in t:selectOneRadio layout="spread". Judging the HTML source, it incorrectly obtains the client ID of t:selectOneRadio instead of the one of the t:radio (or just "this") as first argument of the ajax function. This is been used in document.getElementById() which in turns returns null/undefinied and breaks the ajax function.
XHTML source:
<t:selectOneRadio id="item" value="#
" layout="spread">
<f:selectItems value="#
" />
<f:ajax event="click" />
</t:selectOneRadio>
<t:radio for="item" index="0" />
<t:radio for="item" index="1" />
Generated HTML source (labels omitted):
<input id="form:item:0" type="radio" name="form:item" value="item1" onclick="mojarra.ab('form:item',event,'click',0,0)" />
<input id="form:item:1" type="radio" name="form:item" value="item2" onclick="mojarra.ab('form:item',event,'click',0,0)" />
Expected HTML source (labels omitted):
<input id="form:item:0" type="radio" name="form:item" value="item1" onclick="mojarra.ab('form:item:0',event,'click',0,0)" />
<input id="form:item:1" type="radio" name="form:item" value="item2" onclick="mojarra.ab('form:item:1',event,'click',0,0)" />
OR
<input id="form:item:0" type="radio" name="form:item" value="item1" onclick="mojarra.ab(this,event,'click',0,0)" />
<input id="form:item:1" type="radio" name="form:item" value="item2" onclick="mojarra.ab(this,event,'click',0,0)" />
Attachments
Issue Links
- is duplicated by
-
TOMAHAWK-1579 Wrong source parameter for JSF AJAX onchange event code since there is no DOM element for HtmlSelectOneRadio
- Closed