You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Jon Scott Stevens <jo...@latchkey.com> on 2002/05/06 01:45:42 UTC

Re: MODERATE for velocity-user@jakarta.apache.org

> Choose a new price for your product offering.<br>
> <select name="D_PRICE" >
> <option value="1.50" #if($Decisions.PRICE.Result==1.50)selected#end >
>   Low Price
> </option>
> <option value="5.00" #if($Decisions.PRICE.Result==5.00)selected#end >
>   Medium Price
> </option>
> <option value="10.00" #if($Decisions.PRICE.Result==10.00)selected#end >
>   High Price
> </option>
> </select>

All you have to do to make the above work is put the RHS (right hand side)
into quotes (assuming getResult() returns a String):

<option value="10.00" #if($Decisions.PRICE.Result=="10.00")selected#end >

-jon


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>