Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

combo box in spring web mvc

I am using spring web mvc for my app's UI part..

By using following code, i am getting List Box where i can select more then 1 value..

<form:select path="domainsList">
<form:options items="${domainsList}" itemValue="domain" itemLabel="domain"/>
</form:select>

But I need a drop down combo box...

Can any one suggest how can i convert it to combo box ?

Thanks in advance..

like image 858
Nirmal Avatar asked Nov 04 '09 11:11

Nirmal


People also ask

What is combo box example?

A combo box is a text box with a list box attached. This type of control enables users to select a predefined value in a list or type their own value in the text box portion of the control. The list is hidden until the user clicks the arrow next to the box.

What is the purpose of @CookieValue annotation in spring?

The Spring Framework provides the @CookieValue annotation to get the value of any HTTP cookie without iterating over all the cookies fetched from the request. This annotation can be used to map the value of a cookie to the controller method parameter.

What is UI combo box?

A combo box is a commonly used graphical user interface widget (or control). Traditionally, it is a combination of a drop-down list or list box and a single-line editable textbox, allowing the user to either type a value directly or select a value from the list.

How will you auto populate dropdown box in spring?

To render a list box, just add the “multiple=true” attribute in the select tag. HTML code, with a hidden value to handle the country selections. For dropdown box, list box or “select” options, as long as the “path” or “property” is equal to the “select option key value“, the options will be selected automatically.


1 Answers

Sorry, for asking silly question.. But i got working combo box by following code :

<form:select path="domainsList" multiple="false" size="1">
<form:options items="${domainsList}" itemValue="domain" itemLabel="domain"/>
</form:select>
</form:form>
like image 165
Nirmal Avatar answered Sep 28 '22 06:09

Nirmal