[
https://issues.apache.org/jira/browse/MYFACES-3996?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14627300#comment-14627300
]
Leonardo Uribe commented on MYFACES-3996:
-----------------------------------------
I have tested this bug with RI 2.2.11 and it works there, so I can confirm the
bug.
It is similar but not related to MYFACES-3874.
The problem here is myfaces detects the component and converts it into a
h:link, but h:link does not have "class" attribute defined. It looks like
something related to the renderer:
java.lang.IllegalArgumentException: Cannot convert active of type class
java.lang.String to class java.lang.Class
at com.sun.el.lang.ELSupport.coerceToType(ELSupport.java:402)
at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:227)
at
org.apache.myfaces.view.facelets.el.ContextAwareTagValueExpression.getValue(ContextAwareTagValueExpression.java:96)
at
org.apache.myfaces.shared.renderkit.html.HtmlResponseWriterImpl.closeStartTagIfNecessary(HtmlResponseWriterImpl.java:421)
> Value of HTML-Attribute class on Passthrough element is casted to
> java.lang.Class if coming from EL
> ---------------------------------------------------------------------------------------------------
>
> Key: MYFACES-3996
> URL: https://issues.apache.org/jira/browse/MYFACES-3996
> Project: MyFaces Core
> Issue Type: Bug
> Affects Versions: 2.2.8
> Environment: Apache TomEE 1.7.1, Linux
> Reporter: Christian Kalkhoff
>
> In my XHTML-Facelets I use Passthrough-Elements whereever possible. Now I ran
> into a bug (IMHO) with the HTML-Class-Attribute:
> <a jsf:outcome="other.xhtml" class="#{bean.somebool?'active':''}">Linktext</a>
> gives
> javax.el.ELException - Cannot convert active of type class java.lang.String
> to class java.lang.Class
> at org.apache.el.lang.ELSupport.coerceToType(ELSupport.java:419)
> Changing the attribute name to jsf:styleClass works.
> Changing the content of class to some static string works.
> Might be related to MYFACES-3874.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)