You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Johan Hansson (JIRA)" <de...@myfaces.apache.org> on 2007/05/15 11:55:17 UTC

[jira] Commented: (TOMAHAWK-463) for attribute not rendered on radio buttons

    [ https://issues.apache.org/jira/browse/TOMAHAWK-463?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12495932 ] 

Johan Hansson commented on TOMAHAWK-463:
----------------------------------------

This only solves the problem when using t:radio. Using the source from MyFaces Tomahawk 1.1.5 we solved this by edit the following files:

org.apache.myfaces.shared_tomahawk.renderkit.html.HtmlRadioRendererBase

edit row 206 .getLabel(), itemDisabled, itemChecked, false); -> .getLabel(), itemDisabled, null, itemChecked, false); (I dont know how the get the correct id here)
edit row 218  boolean disabled,   -> boolean disabled, String radioId
edit row 230 if (renderId) { -> if (renderId && radioId!=null) {
edit row 231 writer.writeAttribute(HTML.ID_ATTR, clientId, null); -> writer.writeAttribute(HTML.ID_ATTR, radioId, null);

org.apache.myfaces.renderkit.html.ext.HtmlRadioRenderer
added on row 136  writer.writeAttribute(HTML.FOR_ATTR, radio.getId(), null); 
edit row 141 selectItem.isDisabled(), -> selectItem.isDisabled(), radio.getId(),

I think this is a better solution the in the description. I don't know how to make a patch but when I learn I will try to do one.

> for attribute not rendered on radio buttons
> -------------------------------------------
>
>                 Key: TOMAHAWK-463
>                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-463
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>          Components: selectOneRadio / radio
>    Affects Versions: 1.1.2
>         Environment: n/a
>            Reporter: Russell Loewen
>         Assigned To: Grant Smith
>            Priority: Minor
>
> SelectOneRadio doesn't render the "for" attribute on the label tag it creates beside the radio button.  The net effect is that on Internet Explorer the user is not able to click on the label text to select the radio item. It's arguable that this is IE's problem for not supported the parent-child relationship between the label tag surrounding the radio button, but the for attribute is a clearer association anyhow. 
> I believe that the following could fix the problem.
> org.apache.myfaces.shared_impl.renderkit.html.HtmlResponseWriterImpl.class
> after Line 163, insert:
>             _writer.writeAttribute(HTML.FOR_ATTR, uiComponent.getClientId(facesContext), null);

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.