Description: A select box input with the corresponding label. If auto-complete is enabled it becomes a dynamic filtering selection window.

JavaDoc: Click here

Remarks: The id will map to an existent stage parameter if it exists.
This will cause it's value to be initialized and submitted to this parameter. All validation as defined in the parameter will be applied to the submitted value.

The options must be provider in a List of Option objects.

The connectTo and connectByField attributes are used for chaining combo boxes. AT THE MOMENT, CHAINED COMBOS ONLY WORK IN RICH MODE! Will be implemented for other modes soon.

Body content: JSP content that should provide the list of <option> elements. Ignored if the "options" parameter is set.


Name Description Data type Required Default value
id The id for the generated HTML input String Yes -
dataSourceAttribute The corresponding data source field id for editable detailsForms. String No The value of the id parameter
label The label for the input String No A message with the id identical to the given tag id, or, if non-existent, the camel-cased interpretation of the id
labelCSSClass A CSS class to apply to the HTML label tag String No -
autocomplete Activates the auto-complete mode Boolean No False. (True if emptyText is used)
showDescription Activates the rendering of the description field bellow each option title in the list box of options Boolean No False.
noTabIndex If we want to omit the tab index attribute Boolean No False
readonly Render the value with a label, do not create an input. Boolean No False
tip A tip for the current field. String No -
helpID The id of the existing help item to use as help for this field. String No -
emptyText A message that indicates that the field is empty (forces autocomplete=true). String No -
options A List of options for the combo List<Option<?>> No The ajaxloader response, or the contained <option> elements
addNull Adds a null option to the selection list Boolean No False
ajaxEvent An AJAX event to load the options for the combo. In the form "eventID" or "stageID:eventID". String No -
fields The fields to read from the JSON AJAX response. In the form "IDField,DescriptionField". String No "k,v"
connectTo The ids of the child components to connect to. Comma separated. String No -
connectByField The name of the field on the child component to pass the selected value to. String No -
optionsperpage The number of options in each page. Number No 25 if it is an AJAX event (and cannot be changed in this case)
width The width of the combo. Number No auto (in non-ritch mode is the greatest of this and listWidth value)
listWidth The width of dropdown list. Number No auto
value The value selected String No -
groupLabel Label text format and spacing normalization String No False
       <dif:comboField id="country" autocomplete="true" options="${stage.contries}" />
       <dif:comboField id="cities" autocomplete="true" ajaxEvent="stage:getcities" fields="id,name" optionsperpage="10" />
       <dif:comboField id="sex">
           <option value="m">Male</option>
           <option value="f">Female</option>


Combo Field sample with auto-complete enabled

See also:

Back to tag reference