20030407 Monday April 07, 2003

Cool JSTL Trick I didn't know this, but JSTL's Expression Language is smarter than I thought. It is actually able to interpret the following expression:

<c:when test="{bodyId == ('login' or 'about')}">

As you can plainly see, this is much easier than the long way I was writing my expressions:

<c:when test="{bodyId == 'login' or bodyId == 'about'}">

Cool! (I removed the $ before bodyId to make Velocity happy.)

Update: False alarm - this doesn't work like I'd hoped. The long way seems to be the only real way to make this logic work. Posted in Java at Apr 07 2003, 11:51:08 PM MDT 1 Comment

Comments:

You should be able to make Velocity happy by escaping the $ with a backslash \$

Posted by Lance on April 08, 2003 at 07:01 AM MDT #

Post a Comment:
  • HTML Syntax: Allowed
Click me to subscribe
Matt Raible is a Web Architect who enjoys developing applications with open source technologies. Contact me for rates.
« December 2008
SunMonTueWedThuFriSat
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
   
       
Today

Recent Entries

Tag Cloud