Home Spring Spring3.2 The radiobuttons tag
Questions:Ask|Latest


 
 

Share on Google+Share on Google+

The radiobuttons tag

Advertisement
In this section, you will learn about radiobuttons tag of Spring form tag library.

The radiobuttons tag

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

A radio button is a type of graphical user interface element that allows the user to choose only one of a predefined set of options.

Sometimes you prefer to pass in the available options as a runtime variable. You can do this using radiobuttons tags. You can pass in an Array, a List or a Map containing the available options in the "items" property of radiobuttons tag. You can do this as follows :

<tr>
	<td>Sex:</td>
	<td><form:radiobuttons path="sex" items="${sexOptions}"/></td>
</tr>

Here, sexOptions is a List. In the case where you use a Map, the map entry key will be used as the value and the map entry's value will be used as the label to be displayed.

 

Advertisement

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

Ask Questions?    Discuss: The radiobuttons tag  

Post your Comment


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