Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.1.7
    • Component/s: selectOneRadio / radio
    • Labels:
      None

      Description

      I miss the id attribute in radio buttons (input tags) rendered via t:selectOneRadio.
      This is required in order for easier javascript access and for better accessibility during Selenium testing.
      Therefore I request an additional boolean attribute renderChildIds.
      The index of the radio buttons should be rendered in brackets, e.g. myform:mybutton[0] - myform:mybutton[n]

      I'll try to provide a patch

      1. 1301.zip
        6 kB
        Michael Heinen

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Closed Closed
        12d 8h 32m 1 Leonardo Uribe 30/Jul/08 21:54
        Closed Closed Reopened Reopened
        92d 16h 34m 1 Michael Heinen 31/Oct/08 13:28
        Reopened Reopened Resolved Resolved
        207d 13h 18m 1 Leonardo Uribe 27/May/09 03:46
        Resolved Resolved Closed Closed
        428d 23h 47m 1 Leonardo Uribe 30/Jul/10 03:34
        Leonardo Uribe made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Leonardo Uribe made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Leonardo Uribe added a comment -

        Checked again and it is working correctly. Tomahawk core12 render ids on t:selectOneRadio but tomahawk core do not. The code that do it comes from shared, so it is preferred do not change it and suggest use jsf 1.2 instead.

        Show
        Leonardo Uribe added a comment - Checked again and it is working correctly. Tomahawk core12 render ids on t:selectOneRadio but tomahawk core do not. The code that do it comes from shared, so it is preferred do not change it and suggest use jsf 1.2 instead.
        Hide
        Leonardo Uribe added a comment -

        The error related here is about t:radio rendering, according to the example, not t:selectOneRadio rendering. Maybe it is a misunderstanding.

        Show
        Leonardo Uribe added a comment - The error related here is about t:radio rendering, according to the example, not t:selectOneRadio rendering. Maybe it is a misunderstanding.
        Michael Heinen made changes -
        Status Closed [ 6 ] Reopened [ 4 ]
        Resolution Fixed [ 1 ]
        Hide
        Michael Heinen added a comment -

        This is not working in 1.1.7

        Sample:
        <h:form id="ccwForm_p1">
        <t:selectOneRadio id="aname"
        value="#

        {MyController.bla}

        "
        layout="pageDirection">
        <f:selectItems value="#

        {MyController.items}

        "/>

        Rendered
        name="ccwInc:ccwForm_p1:aname"

        An id attribute, as described in previous comment, is not rendered at all

        Show
        Michael Heinen added a comment - This is not working in 1.1.7 Sample: <h:form id="ccwForm_p1"> <t:selectOneRadio id="aname" value="# {MyController.bla} " layout="pageDirection"> <f:selectItems value="# {MyController.items} "/> Rendered name="ccwInc:ccwForm_p1:aname" An id attribute, as described in previous comment, is not rendered at all
        Leonardo Uribe made changes -
        Fix Version/s 1.1.7 [ 12313398 ]
        Fix Version/s 1.1.7-SNAPSHOT [ 12312361 ]
        Leonardo Uribe made changes -
        Resolution Fixed [ 1 ]
        Status Open [ 1 ] Closed [ 6 ]
        Fix Version/s 1.1.7-SNAPSHOT [ 12312361 ]
        Hide
        Leonardo Uribe added a comment -

        this is a duplicate of TOMAHAWK-1295.

        On tomahawk core12, this problem is not present, since there was changes on jsf 1.2 spec that causes the id rendered is like this:

        clientIdOfComponent:index

        so the solution should pass from this:

        jsf

        <t:selectOneRadio id="set2" layout="spread">
        <f:selectItem itemValue="0"
        itemLabel="group 0" />
        <f:selectItem itemValue="1"
        itemLabel="group 1" />
        <f:selectItem itemValue="2"
        itemLabel="group 2" />
        </t:selectOneRadio>
        <t:radio for="set2" index="0" />
        <t:radio for="set2" index="1" />
        <t:radio for="set2" index="2" />

        html

        <label><input type="radio" name="_idJsp0:set2" value="0" /> group 0</label>
        <label><input type="radio" name="_idJsp0:set2" value="1" /> group 1</label>
        <label><input type="radio" name="_idJsp0:set2" value="2" /> group 2</label>

        to this:

        <label><input id="_idJsp0:set2:0" type="radio" name="_idJsp0:set2" value="0" /> group 0</label>
        <label><input id="_idJsp0:set2:1" type="radio" name="_idJsp0:set2" value="1" /> group 1</label>
        <label><input id="_idJsp0:set2:2" type="radio" name="_idJsp0:set2" value="2" /> group 2</label>

        If a change is done on tomahawk core 1.1, it should be the same as presented here, so I'll fix it in this way.

        thanks for the suggestions.

        Show
        Leonardo Uribe added a comment - this is a duplicate of TOMAHAWK-1295 . On tomahawk core12, this problem is not present, since there was changes on jsf 1.2 spec that causes the id rendered is like this: clientIdOfComponent:index so the solution should pass from this: jsf <t:selectOneRadio id="set2" layout="spread"> <f:selectItem itemValue="0" itemLabel="group 0" /> <f:selectItem itemValue="1" itemLabel="group 1" /> <f:selectItem itemValue="2" itemLabel="group 2" /> </t:selectOneRadio> <t:radio for="set2" index="0" /> <t:radio for="set2" index="1" /> <t:radio for="set2" index="2" /> html <label><input type="radio" name="_idJsp0:set2" value="0" /> group 0</label> <label><input type="radio" name="_idJsp0:set2" value="1" /> group 1</label> <label><input type="radio" name="_idJsp0:set2" value="2" /> group 2</label> to this: <label><input id="_idJsp0:set2:0" type="radio" name="_idJsp0:set2" value="0" /> group 0</label> <label><input id="_idJsp0:set2:1" type="radio" name="_idJsp0:set2" value="1" /> group 1</label> <label><input id="_idJsp0:set2:2" type="radio" name="_idJsp0:set2" value="2" /> group 2</label> If a change is done on tomahawk core 1.1, it should be the same as presented here, so I'll fix it in this way. thanks for the suggestions.
        Leonardo Uribe made changes -
        Assignee Leonardo Uribe [ lu4242 ]
        Hide
        Hazem Saleh added a comment -

        I thinking adding additional attribute needs a discussion on the development mailing list.

        Show
        Hazem Saleh added a comment - I thinking adding additional attribute needs a discussion on the development mailing list.
        Michael Heinen made changes -
        Field Original Value New Value
        Attachment 1301.zip [ 12386386 ]
        Hide
        Michael Heinen added a comment - - edited

        The changes worked locally for me with tomahawk 1.1.5.
        But I was not able to create a patch because of the unfamiliar project structure.
        I am not sure about java files in target folders. Those cannot be added into a patch.
        Therefore I added them manually but I think this will not work this way ...

        Class org.apache.myfaces.shared_tomahawk.renderkit.html.HtmlRadioRendererBase is in the shared_tomahawk project which does not have access to classes in tomahawk project e.g. to org.apache.myfaces.component.html.ext.HtmlSelectOneRadio.
        I found org.apache.myfaces.component.html.ext.HtmlSelectOneRadio only in a folder called tomahawk/target/myfaces-builder-plugin/main/java.
        So where can I patch this class ?
        Class org.apache.myfaces.shared_tomahawk.renderkit.html.HtmlRadioRendererBase is also in a target folder, namely tomahawk/target/shared_sources.
        Moreover I was not able to add a entity for tomahawk.tld to the patch.

        I added all these files separately into the zip file.

        Could someone explain these problems and the project structure to me?
        Is there any documentation available?

        Show
        Michael Heinen added a comment - - edited The changes worked locally for me with tomahawk 1.1.5. But I was not able to create a patch because of the unfamiliar project structure. I am not sure about java files in target folders. Those cannot be added into a patch. Therefore I added them manually but I think this will not work this way ... Class org.apache.myfaces.shared_tomahawk.renderkit.html.HtmlRadioRendererBase is in the shared_tomahawk project which does not have access to classes in tomahawk project e.g. to org.apache.myfaces.component.html.ext.HtmlSelectOneRadio. I found org.apache.myfaces.component.html.ext.HtmlSelectOneRadio only in a folder called tomahawk/target/myfaces-builder-plugin/main/java. So where can I patch this class ? Class org.apache.myfaces.shared_tomahawk.renderkit.html.HtmlRadioRendererBase is also in a target folder, namely tomahawk/target/shared_sources. Moreover I was not able to add a entity for tomahawk.tld to the patch. I added all these files separately into the zip file. Could someone explain these problems and the project structure to me? Is there any documentation available?
        Michael Heinen created issue -

          People

          • Assignee:
            Leonardo Uribe
            Reporter:
            Michael Heinen
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development