You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Bernhard Huemer (JIRA)" <de...@myfaces.apache.org> on 2007/08/11 00:21:42 UTC
[jira] Updated: (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:all-tabpanel ]
Bernhard Huemer updated MYFACES-1670:
-------------------------------------
Status: Patch Available (was: Open)
> 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
> Affects Versions: 1.2.1-SNAPSHOT
> 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, MYFACES-1670.patch, 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.