The only case you would use defferred EL syntax (#{...}) is for later
assignment-- things like c:forEach or c:set express variables which can
be assigned later:
http://weblogs.java.net/blog/jhook/archive/2006/03/the_unified_el.html
In the case of c:choose/c:when, this is a pure evaluation time process,
no expressions get scoped otherwise, hence no need to support deferred
evaluation here. I know it's confusing, but the blog link may offer
some help as to why deferred EL even exists.
-- Jacob
Antonio Goncalves wrote:
> 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