struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rick Reumann <>
Subject Re: ActionForm problem
Date Thu, 17 Mar 2005 22:23:53 GMT
Leon Rosenberg wrote the following on 3/17/2005 5:10 PM:

> I asked for an example where you actually need EL -> can't achieve the same
> with (standard) tags.

Oh, ok. No, you are right, all the EL expressions do is make my page 
look a little cleaner vs using c:out. Not that big of a deal I guess, 
however they are nice for certain things...

For examle... say I wanted to quickly change the color of a class var 
for table row color based on the index...

I could just do...

<tr class="${status.index % 2 != 0? 'odd':'even'}">

Granted I should make a tag that does this (and I did), but it was just 
for illustration and it seems cleaner than going the whole <c:choose> 
route imo.

Or, as in the intial question posed, where you wanted to display 
different things based on a boolean...

${bean.boolProp?'Yes, I am an idiot':'No, not an idiot'}


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message