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>
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.
Ask Questions? Discuss: The option tag
Post your Comment