Hi,
I see onclick, onmouseover, etc. attributes of <h:outputText> are passed
thru and rendered.
For:
<h:outputText id="..." value="test" onclick="alert('click');" .../>
I got this with MyFaces 2:
<span id="..." *onclick="alert('click');"* >test</span>
However, Mojarra ignores 'onclick':
<span id="..." >test</span>
HtmlTextRenderer[0] of MyFaces, which extends HtmlTextRendererBase,
renders[1] pass thru attributes of HTML.COMMON_PASSTROUGH_ATTRIBUTES[2];
while Mojarra ignores onclick on <h:outputText>.
Is it OK to pass thru some attributes that are not defined in the spec?
I couldn't find anything about onclick, onmouseover, etc. of <h:outputText>
in
* JSF spec
* JSF Spec Facelet Taglib doc :
https://javaserverfaces.dev.java.net/nonav/docs/2.0/vdldocs/facelets/h/outputText.html
* JSF Spec RenderKit doc:
https://javaserverfaces.dev.java.net/nonav/docs/2.0/renderkitdocs/HTML_BASIC/javax.faces.Outputjavax.faces.Text.html
* JSF Spec JavaDoc:
http://java.sun.com/javaee/javaserverfaces/2.0/docs/api/javax/faces/component/html/HtmlOutputText.html
[0]
http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlTextRenderer.java?view=markup
[1]
http://svn.apache.org/viewvc/myfaces/shared/trunk/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlTextRendererBase.java?view=markup
line
127
[2]
http://svn.apache.org/viewvc/myfaces/shared/trunk/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HTML.java?view=markup
line
154
BTW, as you can see this is not something special to <h:outputText>. Most
components have this issue.
Regards,
Ali
--
My Blog: http://blog.aliok.com.tr
Twitter: http://twitter.com/aliok_tr