You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Russell Loewen (JIRA)" <de...@myfaces.apache.org> on 2006/06/02 19:58:29 UTC

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

for attribute not rendered on radio buttons
-------------------------------------------

         Key: TOMAHAWK-463
         URL: http://issues.apache.org/jira/browse/TOMAHAWK-463
     Project: MyFaces Tomahawk
        Type: Bug

  Components: selectOneRadio / radio  
    Versions: 1.1.2    
 Environment: n/a
    Reporter: Russell Loewen
    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.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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

Posted by "Johan Hansson (JIRA)" <de...@myfaces.apache.org>.
     [ https://issues.apache.org/jira/browse/TOMAHAWK-463?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Johan Hansson updated TOMAHAWK-463:
-----------------------------------

    Status: Patch Available  (was: Open)

> 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.


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

Posted by "Johan Hansson (JIRA)" <de...@myfaces.apache.org>.
    [ 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.


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

Posted by "Russell Loewen (JIRA)" <de...@myfaces.apache.org>.
    [ http://issues.apache.org/jira/browse/TOMAHAWK-463?page=comments#action_12414502 ] 

Russell Loewen commented on TOMAHAWK-463:
-----------------------------------------

I'm gonna be honest that from my location I am having trouble checking out from SVN so all my looking is being done remotely, and my comment here is further based on the 1.1.2 branch. 

Am I correct that one is used for rendering the tags produced by SelectOneRadio when you are using it for display, and the other is used by the Radio tag when you are using SelectOneRadio with a spread layout?

If so, I would say that a similar change needs to be made in both places, and even that we should really be getting it changed in the myfaces core as well. That is, the problem occurs in all SelectOneRadio components regardless of whether the developer is using spread/radio for their layout or just the default rendering for SelectOneRadio. It's not particular in the tomahawk code, but for my current application I am using the spread layout so that's why I reported the issue here.


> for attribute not rendered on radio buttons
> -------------------------------------------
>
>          Key: TOMAHAWK-463
>          URL: http://issues.apache.org/jira/browse/TOMAHAWK-463
>      Project: MyFaces Tomahawk
>         Type: Bug

>   Components: selectOneRadio / radio
>     Versions: 1.1.2
>  Environment: n/a
>     Reporter: Russell Loewen
>     Assignee: 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.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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

Posted by "Grant Smith (JIRA)" <de...@myfaces.apache.org>.
    [ http://issues.apache.org/jira/browse/TOMAHAWK-463?page=comments#action_12414490 ] 

Grant Smith commented on TOMAHAWK-463:
--------------------------------------

Unfortunately HtmlResponseWriterImpl has changed quite a bit since 1.1.2. Could you have a look at the current svn head and see if it still makes sense to add the attribute from there ? I suspect HtmlRadioRendererBase is actually where we should be fixing this. 

> for attribute not rendered on radio buttons
> -------------------------------------------
>
>          Key: TOMAHAWK-463
>          URL: http://issues.apache.org/jira/browse/TOMAHAWK-463
>      Project: MyFaces Tomahawk
>         Type: Bug

>   Components: selectOneRadio / radio
>     Versions: 1.1.2
>  Environment: n/a
>     Reporter: Russell Loewen
>     Assignee: 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.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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

Posted by "Skylar Sutton (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TOMAHAWK-463?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12473163 ] 

Skylar Sutton commented on TOMAHAWK-463:
----------------------------------------

I agree. It is essential that labels utilize the "for" attribute for IE. This is a major complaint by our users whenever we use a SelectOneRadio tag, they are forced to click on the tiny radio button itself, and not the label.

Perhaps a boolean switch could be built into the tag?

> 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.