On Thu, 2003-08-21 at 06:24, Sri Sankaran wrote:
> I am a little confused over when an attribute value of ${whatever} is evaluated as 
> an expression and when it is treated literally.
> 
> In particular, I am noticing an inconsistency in the way an attribute value is being 
> treated by <j:set> and <j:if>.  It seems that <j:set>'s value attribute is treated 
> literally; however, the <j:if>'s test attribute is evaluated as an expression.
> 
> Consider the following property settings
> foo-bar.baz = bing
> foo_bar.baz = bing
> foo.bar.baz = bing
> 
> Here are some usages:
> Example 1:
> <j:set var="fbb" value="${foo-bar.baz}"/>
> <echo message="fbb = ${fbb}"/> 
> <j:if test="${foo-bar.baz == null}">
>   <echo message="foo-bar.baz is null"/>
> </j:if>
> 
> This outputs 
>   fbb is 0

0 is the result of the arithmethic expression (foo MINUS bar.baz).

One better should avoid "-" in property names.....
-- 
Martin Skopp
Riege Software International GmbH
Support: mailto:[EMAIL PROTECTED], Information: http://www.riege.com
 
This email is intended to be viewed with a nonproportional font.
Public Key on http://www.keyserver.net, Key-ID: 3D4027B5
Fingerprint: 1970 C78D 9A1D 99FA 5CE4  5C0D 29E6 6A95 3D40 27B5



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to