You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Alexander Zynevich (JIRA)" <de...@myfaces.apache.org> on 2007/06/24 17:12:26 UTC

[jira] Commented: (MYFACES-1670) A dollar-type, 2 level EL expression evaluates to null

    [ https://issues.apache.org/jira/browse/MYFACES-1670?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12507689 ] 

Alexander Zynevich commented on MYFACES-1670:
---------------------------------------------

just rechecked this smallest application in Glassfish, it did produce output as expected,
I also recheck it on Geronimo with different <managed-bean-scope>: application, request, session. Result is always the same and incorrect.

> A dollar-type, 2 level EL expression evaluates to null
> ------------------------------------------------------
>
>                 Key: MYFACES-1670
>                 URL: https://issues.apache.org/jira/browse/MYFACES-1670
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: JSR-252
>         Environment: geronimo-2.0-M6-rc1
>            Reporter: Alexander Zynevich
>             Fix For: 1.2.0-SNAPSHOT
>
>         Attachments: Customer.java, CustomerDetailsBean.java, eltest.war, faces-config.xml, print.jsp, web.xml
>
>
> I have a simple code where dollar-type expression (like ${}) works differently than shrap-type  expression (like #{}),
> I put into the http session a managed bean aggregating another bean.
> ${parent} is calculated, while ${parent.child} is always null (it is printed as an empty string and equals to null in "when" tag).
> For example the following snip of JSP code:
>    <f:view>
>     <h:form id="myform" >
>     <b>Using sharp-el</b>: <br/>
>     \*<h:outputText id="cll1" value="#{customerDetailsBean}" />\*<br/>
>     \*<h:outputText id="cll2" value="#{customerDetailsBean.customer}" />\*<br/>
>     <b>Using dollar-el</b>: <br/>
>     \*${customerDetailsBean}\*<br/>
>     \*${customerDetailsBean.customer}\*<br/>
>     <b>Classical "servlet" style</b>: <br/>
>     \*<% if (session.getAttribute("customerDetailsBean") != null) {%><%= session.getAttribute("customerDetailsBean") %><% } %>\*<br/>
>     \*<% if (session.getAttribute("customerDetailsBean") != null) {%><%= ((eltest.CustomerDetailsBean)session.getAttribute("customerDetailsBean")).getCustomer() %><% } %>\*<br/>
>     </h:form>
>     </f:view>
> -- PRODUCES --:
>     *Using sharp-el:* 
>     \*CustomerDetailsBean: { customer: Customer {frstName: Alex , lastName: Zynevich, id: 1979}}\*
>     \*Customer {frstName: Alex , lastName: Zynevich, id: 1979}\*
>     *Using dollar-el:* 
>     \*CustomerDetailsBean: { customer: Customer {frstName: Alex , lastName: Zynevich, id: 1979}}\*
>     \*\*
>     *Classical "servlet" style:* 
>     \*CustomerDetailsBean: { customer: Customer {frstName: Alex , lastName: Zynevich, id: 1979}}\*
>     \*Customer {frstName: Alex , lastName: Zynevich, id: 1979}\*
> while I would expect:
>     *Using sharp-el:* 
>     \*CustomerDetailsBean: { customer: Customer {frstName: Alex , lastName: Zynevich, id: 1979}}\*
>     \*Customer {frstName: Alex , lastName: Zynevich, id: 1979}\*
>     *Using dollar-el:* 
>     \*CustomerDetailsBean: { customer: Customer {frstName: Alex , lastName: Zynevich, id: 1979}}\*
>     \*Customer {frstName: Alex , lastName: Zynevich, id: 1979}\*
>     *Classical "servlet" style:* 
>     \*CustomerDetailsBean: { customer: Customer {frstName: Alex , lastName: Zynevich, id: 1979}}\*
>     \*Customer {frstName: Alex , lastName: Zynevich, id: 1979}\*
> you may find the maven project at https://issues.apache.org/jira/browse/GERONIMO-3253, war is attached

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.