Home Spring Spring3.2 The radiobuttons tag



The radiobuttons tag
Posted on: March 22, 2013 at 12:00 AM
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.

 

Related Tags for The radiobuttons tag:


More Tutorials from this section

Ask Questions?    Discuss: The radiobuttons tag  

Post your Comment


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

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.