Package org.apache.struts2.components

# Class OptGroup

java.lang.Object
org.apache.struts2.components.Component
org.apache.struts2.components.OptGroup

public class OptGroup extends Component

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

This component is to be used within a Select component.

     <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>

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final String`
  `INTERNAL_LIST_UI_BEAN_LIST_PARAMETER_KEY`
  `protected ListUIBean`
  `internalUiBean`
  `protected jakarta.servlet.http.HttpServletRequest`
  `req`
  `protected jakarta.servlet.http.HttpServletResponse`
  `res`

  ### Fields inherited from class org.apache.struts2.components.Component

  `actionMapper, attributes, COMPONENT_STACK, devMode, escapeHtmlBody, performClearTagStateForTagPoolingServers, stack, standardAttributesMap, throwExceptionOnELFailure`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `OptGroup(ValueStack stack, jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse res)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `end(Writer writer, String body)`
  Callback for the end tag of this component.
  `void`
  `setContainer(Container container)`
  `void`
  `setDisabled(String disabled)`
  `void`
  `setLabel(String label)`
  `void`
  `setList(Object list)`
  `void`
  `setListCssClass(String listCssClass)`
  `void`
  `setListCssStyle(String listCssStyle)`
  `void`
  `setListKey(String listKey)`
  `void`
  `setListTitle(String listTitle)`
  `void`
  `setListValue(String listValue)`

  ### Methods inherited from class org.apache.struts2.components.Component

  `addAllAttributes, addParameter, completeExpression, copyAttributes, determineActionURL, determineNamespace, end, escapeHtmlBody, fieldError, findAncestor, findString, findString, findValue, findValue, findValue, getAttributes, getComponentStack, getNamespace, getPerformClearTagStateForTagPoolingServers, getStack, getStandardAttributes, isAcceptableExpression, isValidTagAttribute, popComponentStack, setActionMapper, setDevMode, setEscapeHtmlBody, setNotExcludedAcceptedPatterns, setPerformClearTagStateForTagPoolingServers, setThrowExceptionsOnELFailure, setUrlHelper, start, stripExpression, toString, usesBody`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### INTERNAL_LIST_UI_BEAN_LIST_PARAMETER_KEY

    public static final String INTERNAL_LIST_UI_BEAN_LIST_PARAMETER_KEY
    See Also:
      - Constant Field Values

  - ### req

    protected jakarta.servlet.http.HttpServletRequest req

  - ### res

    protected jakarta.servlet.http.HttpServletResponse res

  - ### internalUiBean

    protected ListUIBean internalUiBean

- ## Constructor Details

  - ### OptGroup

    public OptGroup(ValueStack stack, jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse res)

- ## Method Details

  - ### setContainer

    public void setContainer(Container container)

  - ### end

    public boolean end(Writer writer, String body)
    Description copied from class: `Component`
    Callback for the end tag of this component. Should the body be evaluated again?
    NOTE: will pop component stack.
    Overrides:
      `end` in class `Component`
    Parameters:
      `writer` - the output writer.
      `body` - the rendered body.
    Returns:
      true if the body should be evaluated again

  - ### setLabel

    public void setLabel(String label)

  - ### setDisabled

    public void setDisabled(String disabled)

  - ### setList

    public void setList(Object list)

  - ### setListKey

    public void setListKey(String listKey)

  - ### setListValue

    public void setListValue(String listValue)

  - ### setListCssClass

    public void setListCssClass(String listCssClass)

  - ### setListCssStyle

    public void setListCssStyle(String listCssStyle)

  - ### setListTitle

    public void setListTitle(String listTitle)