Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Spring Spring3.2 The option tag

Related Tutorials


 
 

Share on Google+Share on Google+

The option tag

Advertisement
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>

 

Advertisement

If you enjoyed this post then why not add us on Google+? Add us to your Circles



Liked it!  Share this Tutorial


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: March 22, 2013

Related Tutorials

Discuss: The option tag  

Post your Comment


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