velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mohammed Shafi <shille...@gmail.com>
Subject Want to display range of values in a drop down list using velocity template
Date Mon, 17 Mar 2008 13:36:08 GMT

Hi All,

I want to display a range of values in a drop down list using velocity
template.

I hav written the following code ...
 #foreach($p in $productMap)  // productMap is a Map containg all vaues 
<td class="qty">
		#set ($minQty = 1)
		
		#set ($qtyCount = ${p.inventory.NetTotal}) 
			
		#set ($counter = [$minQty..${qtyCount }])
		
        <select id="cartItems[$cartItemIndex].quantity"
name="cartItems[$cartItemIndex].quantity">
	      #foreach( $index in $counter )
		 <option #if($cartItem.quantity == $index)selected #end                             
  
value="${index}">${index}</option>
          #end
        </select>
	
        #springShowErrors("<br>" "req")
       #else
        $cartItem.quantity
	   #end
	</td>
#end


The result of this code is that its not showing range of values in the drop
down list ... its coming empty....

Please let me know if anybody knows abt the answer.......
-- 
View this message in context: http://www.nabble.com/Want-to-display-range-of-values-in-a-drop-down-list-using-velocity-template-tp16092682p16092682.html
Sent from the Velocity - User mailing list archive at Nabble.com.


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


Mime
View raw message