[prev in list] [next in list] [prev in thread] [next in thread] 

List:       velocity-user
Subject:    Re: Looking for a good way to handle this in Velocity
From:       LS <alphafoo () yahoo ! com>
Date:       2001-10-31 16:57:48
[Download RAW message or body]

Hey, your 3AM answer is better than my 5PM answer. And Trevor's answer is along
similar lines, but handles the more generic case where option value != option
description. 

Thanks both of you for the help.

--- Bojan Smojver <bojan@binarix.com> wrote:
> 
> You could make Categories contain two things, value and flag. The flag
> would indicate to the view that it has to render it as selected.
> Something like:
> 
> <select multiple size=6 name=included[]>
>            #foreach ($category in $model.Categories)
>            <option #if($category.flag)selected#end
> value='$category.value' >$category.value
>            #end
> </select>
> 
> Bojan
> 
> PS. Take into account that I've been up till 3 a.m. this morning ;-)


__________________________________________________
Do You Yahoo!?
Make a great connection at Yahoo! Personals.
http://personals.yahoo.com

--
To unsubscribe, e-mail:   <mailto:velocity-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:velocity-user-help@jakarta.apache.org>

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic