org.jboss.seam.annotations.selectitems
Enum SelectItems.Strategy

java.lang.Object
  extended by java.lang.Enum<SelectItems.Strategy>
      extended by org.jboss.seam.annotations.selectitems.SelectItems.Strategy
All Implemented Interfaces:
Serializable, Comparable<SelectItems.Strategy>
Enclosing class:
SelectItems

public static enum SelectItems.Strategy
extends Enum<SelectItems.Strategy>

The available value strategies. Defaults to INDEX.


Enum Constant Summary
INDEX
          The INDEX strategy indicates that the rendered JSF value should be the index of the original list item.
OBJECT
          The OBJECT strategy indicates that the rendered JSF value should be the actual original item object.
STRING
          The STRING strategy indicates that the rendered JSF value should be the toString() value of the original item.
 
Method Summary
static SelectItems.Strategy valueOf(String name)
          Returns the enum constant of this type with the specified name.
static SelectItems.Strategy[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

INDEX

public static final SelectItems.Strategy INDEX
The INDEX strategy indicates that the rendered JSF value should be the index of the original list item.


STRING

public static final SelectItems.Strategy STRING
The STRING strategy indicates that the rendered JSF value should be the toString() value of the original item.


OBJECT

public static final SelectItems.Strategy OBJECT
The OBJECT strategy indicates that the rendered JSF value should be the actual original item object. This will need to either be a String itself or have a JSF converter registered for the type.

Method Detail

values

public static final SelectItems.Strategy[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(SelectItems.Strategy c : SelectItems.Strategy.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static SelectItems.Strategy valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name