You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org> on 2015/07/16 23:39:05 UTC

[jira] [Resolved] (MYFACES-3996) Value of HTML-Attribute class on Passthrough element is casted to java.lang.Class if coming from EL

     [ https://issues.apache.org/jira/browse/MYFACES-3996?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Leonardo Uribe resolved MYFACES-3996.
-------------------------------------
       Resolution: Fixed
         Assignee: Leonardo Uribe
    Fix Version/s: 2.2.9

The error is PassthroughRuleImpl set the wrong type when "class" is used, confusing it with getClass() method. The solution is just check that case and use Object.class as type instead.

> 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
>            Assignee: Leonardo Uribe
>             Fix For: 2.2.9
>
>
> 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)