users@glassfish.java.net

RE: [JSF] UEL vs EL

From: Jason Lee <lee_at_iecokc.com>
Date: Wed, 6 Dec 2006 09:08:02 -0600

Based on my understanding, you're still using UEL, but you're looking at
deferred versus immediate processing. I think what the error is telling
you is that you need to use ${...}, as that gets processed
"immediately", whereas #{...} gets processed later in the process. I
know that's vauge (and there are countless others who can give a better
description of that), but my understanding is a bit vague. :P
 
Bottom line, the JSTL tag requires immediate execution of the EL, so the
#{...} is not allowed. EL using ${...} is still using the UEL, though.
 
Others, feel free to correct my errors. :)
 
-----
Jason Lee, SCJP
Programmer/Analyst
http://www.iec-okc.com <http://www.iec-okc.com/>
 


  _____

        From: Antonio Goncalves [mailto:antonio.mailing_at_gmail.com]
        Sent: Wednesday, December 06, 2006 8:52 AM
        To: users_at_glassfish.dev.java.net
        Subject: [JSF] UEL vs EL
        
        
        Hello,
         
        I'm using JSF tags with Unified EL and it's working fine. In
fact, I've dumped most of my old EL expression except one that uses a
core JTSL tag. Here is the code that works :
         
        <c:when test="${empty sessionScope.cart.cartItems}">
           The Shopping Cart is empty
        </c:when>
         
        cart is a managed bean and cartItems the content of a shopping
cart. But when I try to move to UEL it doesn't work :
         
        <c:when test="#{empty sessionScope.cart.cartItems}">
        or
        <c:when test="#{empty cart.cartItems}">
         
        I get the following message :
        According to the TLD, the attribute test is not a deferred-value
or deferred-method, but the specified value contains a #-expression
         
        Does that mean that I can't use UEL with core tags ? I can't
find up to date information, the only articles I get are about EL. Do
you know if it's the way it's supposed to work ?
         
        Thank you.
         
        Antonio