f:ajax doesn't work in t:selectOneRadio layout="spread" -------------------------------------------------------
Key: TOMAHAWK-1551 URL: https://issues.apache.org/jira/browse/TOMAHAWK-1551 Project: MyFaces Tomahawk Issue Type: Bug Components: selectOneRadio / radio Affects Versions: 1.1.10 Environment: Mojarra 2.0.3, Tomcat 6.0.29, Eclipse 3.6, Windows XP Reporter: Bauke Scholtz 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="#{bean.item}" layout="spread"> <f:selectItems value="#{bean.items}" /> <f:ajax event="click" /> </t:selectOneRadio> <t:radio for="item" index="0" /> <t:radio for="item" index="0" /> 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)" /> -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.