You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Werner Punz (JIRA)" <de...@myfaces.apache.org> on 2010/10/14 13:55:33 UTC
[jira] Commented: (TOMAHAWK-1551) f:ajax doesn't work in
t:selectOneRadio layout="spread"
[ https://issues.apache.org/jira/browse/TOMAHAWK-1551?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12920932#action_12920932 ]
Werner Punz commented on TOMAHAWK-1551:
---------------------------------------
Ok this seems to be a bug, but just for the sake of quickly posting a workaround, you always can use a direct jsf.ajax.request call on the javascript side itself to work around this problem.
> 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="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)" />
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.