The option tag

In this section, you will learn about the option tag of Spring form tag library.

The option tag

In this section, you will learn about the option tag of Spring form tag library.

This option tag renders an HTML 'option'. Sample code is shown below:

<tr>
	<td>State:</td>
	<td>
		<form:select path="state">
			<form:option value="Delhi"/>
			<form:option value="Maharastra"/>
			<form:option value="Gujraat"/>
			<form:option value="Bihar"/>
		</form:select>
	</td>
</tr>

This will be rendered something like this :

<tr>
	<td>State:</td>
	<td>
		<select path="state">
			<option value="Delhi" selected="selected">Gryffindor</option>
			<option value="Maharastra">Maharastra</option>
			<option value="Gujraat">Gujraat</option>
			<option value="Bihar">Bihar</option>
		</select>
	</td>
</tr>

 

Advertisements

Ads
Share on Google+Share on Google+

The option tag

Posted on: March 22, 2013 If you enjoyed this post then why not add us on Google+? Add us to your Circles

Advertisements

Ads
 

Discuss: The option tag  

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Comments:0

Ads

 

Ads