Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
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(),