Uploaded image for project: 'MyFaces Tomahawk'
  1. MyFaces Tomahawk
  2. TOMAHAWK-939

t:radio should support standard pass-through attributes

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.1.11
    • selectOneRadio / radio
    • None

    Description

      t:radio should support the standard passthrough attributes (and probably some others like id) in order to customize the generated <input>. For example, onclick, onchange, etc.

      A temporary fix to this problem looks like the following (for facelets). However, this is not the right long-term solution.

      Index: tomahawk/core/src/main/java/org/apache/myfaces/renderkit/html/ext/HtmlRadioRenderer.java
      ===================================================================
      — tomahawk/core/src/main/java/org/apache/myfaces/renderkit/html/ext/HtmlRadioRenderer.java
      (revision
      431891)
      +++ tomahawk/core/src/main/java/org/apache/myfaces/renderkit/html/ext/HtmlRadioRenderer.java
      (working
      copy)
      @@ -131,7 +131,9 @@

      writer.startElement(HTML.LABEL_ELEM, uiSelectOne);

      • renderRadio(facesContext,
        + uiSelectOne.getAttributes().put(HTML.ONCLICK_ATTR,
        radio.getAttributes().get(HTML.ONCLICK_ATTR));
        +
        + renderRadio(facesContext,
        uiSelectOne,
        itemStrValue,
        selectItem.getLabel(),

      Attachments

        Activity

          People

            lu4242 Leonardo Uribe
            mkienenb Mike Kienenberger
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: