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.tapestry5.util
Class EnumSelectModel

    java.lang.Object
      org.apache.tapestry5.util.AbstractSelectModel
          org.apache.tapestry5.util.EnumSelectModel

All Implemented Interfaces:
  java.io.Serializable, SelectModel

    public final class EnumSelectModel

extends AbstractSelectModel
implements java.io.Serializable

A basic select model for a particular Enum type. The labels for each Enum are drawn from the Enum instance name and the provides message catalog:

- As key ClassName.name if present. The class name excludes the package portion. Ex: "ElementType.LOCAL_VARIABLE"
- As key name if present, i.e., "LOCAL_VARIABLE".
- As a user-presentable version of the name, i.e., "Local Variable".

See Also:
  Serialized Form

Constructor Summary
`EnumSelectModel(java.lang.Class<T> enumClass, Messages messages)`
`EnumSelectModel(java.lang.Class<T> enumClass, Messages messages, T[] values)`

Method Summary
`java.util.List<OptionGroupModel>` | `getOptionGroups()` Returns null.
`java.util.List<OptionModel>` | `getOptions()` Returns the option groupos created in the constructor.

Methods inherited from class org.apache.tapestry5.util.AbstractSelectModel
`visit`

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

Constructor Detail

### EnumSelectModel

    public EnumSelectModel(java.lang.Class<T> enumClass,
                           Messages messages)

### EnumSelectModel

    public EnumSelectModel(java.lang.Class<T> enumClass,
                           Messages messages,
                           T[] values)

Method Detail

### getOptionGroups

    public java.util.List<OptionGroupModel> getOptionGroups()

  Returns null.

  Specified by:
    `getOptionGroups` in interface `SelectModel`
  Returns:
    the groups, or null

### getOptions

    public java.util.List<OptionModel> getOptions()

  Returns the option groupos created in the constructor.

  Specified by:
    `getOptions` in interface `SelectModel`
  Returns:
    the ungrouped options, or null

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 © 2003-2012 The Apache Software Foundation.