myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leonardo Uribe (JIRA)" <...@myfaces.apache.org>
Subject [jira] [Resolved] (MYFACES-3219) EL inline expressions does not resolve cc as expected
Date Tue, 12 Jul 2011 20:39:00 GMT

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

Leonardo Uribe resolved MYFACES-3219.
-------------------------------------

       Resolution: Fixed
    Fix Version/s: 2.1.2
                   2.0.8

> EL inline expressions does not resolve cc as expected
> -----------------------------------------------------
>
>                 Key: MYFACES-3219
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3219
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: JSR-314
>            Reporter: Leonardo Uribe
>            Assignee: Leonardo Uribe
>             Fix For: 2.0.8, 2.1.2
>
>
> Suppose this example:
> <testComposite:compositeRefVE value="success">
> </testComposite:compositeRefVE>
> compositeRefVE.xhtml
> <composite:interface>
>     <composite:attribute name="value"/>
> </composite:interface>
> <composite:implementation>
>     <testComposite:compositeRefVE2>
>        <p>Some text: <h:outputText value="#{cc.attrs.value}"/> there.</p>
>     </testComposite:compositeRefVE2>
> </composite:implementation>
> compositeRefVE2.xhtml
> <composite:interface>
> </composite:interface>
> <composite:implementation>
>     <composite:insertChildren/>    
> </composite:implementation>
> It works, everything is ok in this case. The final output is "Some text: success there.".
But now change compositeRefVE.xhtml to this:
> <composite:interface>
>     <composite:attribute name="value"/>
> </composite:interface>
> <composite:implementation>
>     <testComposite:compositeRefVE2>
>        <p>Some text: #{cc.attrs.value} there.</p>
>     </testComposite:compositeRefVE2>
> </composite:implementation>
> It should do the same, but it does not work, because #{cc.attrs.value} is resolved to
null. Why? There are two reasons:
> 1. When the markup is executed, the current component on the stack is the inner one (compositeRefVE2),
and it should be the outer one. This means the inner component must be pop and push. We didn't
notice the effect in the other case, because Location object is used there to detect the current
composite component.
> 2. If #{cc} is used, the expression should be wrapped using LocationValueExpression,
like on TagAttributeImpl
> Additionally, I saw we are not caching inline EL expressions, so this is a good oportunity
to do it.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message