Fork me on GitHub
Edit on GitHub << back to Tag Reference

optgroup

Please make sure you have read the Tag Syntax document and understand how tag attribute syntax works.

Description

Create a optgroup component which needs to resides within a select tag.

This tag is to be used within a select tag.

Renders a Select Tag’s OptGroup Tag

Attributes

Dynamic Attributes Allowed:

false
 

Name

Required

Default

Evaluated

Type

Description

disabled false false String Set the disable attribute.
label false false String Set the label attribute
list false false String Set the list attribute.
listCssClass false false String Property of list objects to get css class from
listCssStyle false false String Property of list objects to get css style from
listKey false false String Set the listKey attribute.
listTitle false false String Property of list objects to get title from
listValue false false String Set the listValue attribute.
performClearTagStateForTagPoolingServers false false false Boolean Whether to clear all tag state during doEndTag() processing (if applicable)

Examples

<s:select label="My Selection"
           name="mySelection"
           value="%{'POPEYE'}"
           list="%{#{'SUPERMAN':'Superman', 'SPIDERMAN':'spiderman'}}">
   <s:optgroup label="Adult"
                list="%{#{'SOUTH_PARK':'South Park'}}" />
   <s:optgroup label="Japanese"
                list="%{#{'POKEMON':'pokemon','DIGIMON':'digimon','SAILORMOON':'Sailormoon'}}" />
</s:select>