Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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
`static java.lang.String` | `INTERNAL_LIST_UI_BEAN_LIST_PARAMETER_KEY`
`protected ListUIBean` | `internalUiBean`
`protected javax.servlet.http.HttpServletRequest` | `req`
`protected javax.servlet.http.HttpServletResponse` | `res`

Fields inherited from class org.apache.struts2.components.Component
`actionMapper, COMPONENT_STACK, parameters, stack, throwExceptionOnELFailure`

Constructor Summary
`OptGroup(ValueStack stack, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)`

Method Summary
`boolean` | `end(java.io.Writer writer, java.lang.String body)` Callback for the end tag of this component.
`void` | `setContainer(Container container)`
`void` | `setDisabled(java.lang.String disabled)`
`void` | `setLabel(java.lang.String label)`
`void` | `setList(java.lang.String list)`
`void` | `setListKey(java.lang.String listKey)`
`void` | `setListValue(java.lang.String listValue)`

Methods inherited from class org.apache.struts2.components.Component
`addAllParameters, addParameter, altSyntax, altSyntax, completeExpressionIfAltSyntax, copyParams, determineActionURL, determineNamespace, end, fieldError, findAncestor, findString, findString, findStringIfAltSyntax, findValue, findValue, findValue, getComponentStack, getParameters, getStack, popComponentStack, setActionMapper, setThrowExceptionsOnELFailure, start, stripExpressionIfAltSyntax, stripExpressionIfAltSyntax, toString, usesBody`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### INTERNAL_LIST_UI_BEAN_LIST_PARAMETER_KEY

    public static final java.lang.String INTERNAL_LIST_UI_BEAN_LIST_PARAMETER_KEY

See Also:
  Constant Field Values

### req

    protected javax.servlet.http.HttpServletRequest req

### res

    protected javax.servlet.http.HttpServletResponse res

### internalUiBean

    protected ListUIBean internalUiBean

Constructor Detail

### OptGroup

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

Method Detail

### setContainer

    public void setContainer(Container container)

### end

    public boolean end(java.io.Writer writer,
                       java.lang.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(java.lang.String label)

### setDisabled

    public void setDisabled(java.lang.String disabled)

### setList

    public void setList(java.lang.String list)

### setListKey

    public void setListKey(java.lang.String listKey)

### setListValue

    public void setListValue(java.lang.String listValue)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000-2011 Apache Software Foundation. All Rights Reserved.