You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Jason van Zyl <jv...@apache.org> on 2001/04/20 15:26:25 UTC

HTML Widgetss (was: select Box and Velocity)

Nathan Bubna wrote:
> 
> try using a macro like this...
> 
> #macro ( generateSelectBox $name $options $selectedvalue)
>     <select name=$name>
>     #set ($count = 1)
>     #foreach( $option in $options )
>         #if ($selectedvalue)
>             <option value=$count #if ($count == $selectedvalue)
> selected="1"#end>$option</option>
>         #else
>             <option value=$count>$option</option>
>         #end
> 
>         #set ($count = $count + 1)
>     #end
>     </select>
> #end

Cool! Does anyone else have macros like this? It might be nice to
collect
all these HTML widget macros and collect them somewhere so that we
can all use them. I will collect them all and either put them in the
velocity CVS and make them available in the TDK for general use, or
keep them in Turbine CVS. We'll figure the storage out. But having
a widget library would be great!


> > What is the recommended way of building select boxes with turbine and
> > velocity?
> >
> > Is there an equivalent of the SelectorBox class that works with velocity
> > and a vector of Data objects?
> >
> > Cheers,
> >
> > Rich
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: turbine-user-help@jakarta.apache.org
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org

-- 
jvz.

Jason van Zyl
jvanzyl@apache.org

http://jakarta.apache.org/velocity
http://jakarta.apache.org/turbine
http://jakarta.apache.org/commons
http://tambora.zenplex.org

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org