Freemarker builtins for sequences
johnjohnmolina <[email protected]>
| Newsgroups | gmane.comp.web.freemarker.user |
|---|---|
| Message-ID | <[email protected]> |
Hello all,
I'm trying to read a sequence of ints (called errorList), to determine if a
particlular value is contained in the sequence. If so, I would like to
alter the style of a particular line of HTML in a table to be red.
This is the code from the freemarker manual, I've based my code on:
"blue": ${x?seq_contains("blue")?string("yes", "no")}
I'm attempting to read errorList, to see if it contains the int 1,if so,
upon generating the template, show this particular line in red (I'm doing
some server side testing). Everything works ie. errorList is properly
populated. This only partially works, it doesn't revert to default (ie.
black), when 1 is removed from errorList.
<td width="97%" <#if errorList?seq_contains(1)> style="color:red"</#if>>
How long have you been a Y member? </td>
Any help would be appreciated.
Thanks,
JS
--
View this message in context: http://www.nabble.com/Freemarker-builtins-for-sequences-tp20097063p20097063.html
Sent from the freemarker-user mailing list archive at Nabble.com.
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/