myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Marinschek (JIRA)" <...@myfaces.apache.org>
Subject [jira] Updated: (MYFACES-1670) A dollar-type, 2 level EL expression evaluates to null
Date Sun, 12 Aug 2007 13:09:43 GMT

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

Martin Marinschek updated MYFACES-1670:
---------------------------------------

       Resolution: Fixed
    Fix Version/s: 1.2.1-SNAPSHOT
         Assignee: Martin Marinschek
           Status: Resolved  (was: Patch Available)

Sounds reasonable. Thanks Bernhard!

regards,

Martin

> 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
>            Assignee: Martin Marinschek
>             Fix For: 1.2.1-SNAPSHOT, 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.


Mime
View raw message