org.pm4j.core.pm.annotation
Annotation Type PmOptionCfg


@Retention(value=RUNTIME)
@Target(value={TYPE,FIELD,METHOD})
public @interface PmOptionCfg

Specification of an attribute option set.

Author:
olaf boede

Optional Element Summary
 java.lang.String id
           
 PmOptionCfg.NullOption nullOption
          Defines if a null-option should be generated.
 java.lang.String nullOptionResKey
           
 java.lang.String sortBy
          An expression that defines a value to sort the options by.
In not specified, the options will be shown as they are provides by the getOptionValues method.
 java.lang.String title
           
 java.lang.String value
           
 java.lang.String values
          Specification of an EL expression that defines the set of objects to build the options from.
 

values

public abstract java.lang.String values
Specification of an EL expression that defines the set of objects to build the options from.

PmAttrBase.getOptionValues() will be used to get the option objects.

Returns:
Path to the set of objects that is used to build the options.
Example: 'pmBean.allDefinedValues'.
Default:
""

id

public abstract java.lang.String id
Returns:
Path from a found object to the value that provides the identifier of the option.
Example: 'id'.
Default:
""

title

public abstract java.lang.String title
Returns:
Path from a found object to the value that provides the title of the option.
Example: 'name'.
Default:
""

value

public abstract java.lang.String value
Returns:
Path from a found object to the value that provides the value of the option.
Examples:
'' - specifies the found object itself;
'mySubfield.anotherField' - specifies some related content to use.
Default:
""

sortBy

public abstract java.lang.String sortBy
An expression that defines a value to sort the options by.
In not specified, the options will be shown as they are provides by the getOptionValues method.

Sorts specific to the type of the object returned by the sortBy expression:

Examples: Assume getOptionValues() provides a set of User objects.


nullOption

public abstract PmOptionCfg.NullOption nullOption
Defines if a null-option should be generated.

Returns:
The null-option definition.
Default:
org.pm4j.core.pm.annotation.PmOptionCfg.NullOption.DEFAULT

nullOptionResKey

public abstract java.lang.String nullOptionResKey
Returns:
The resource key for the title to display for the null option.
Default:
"nullOptionTitle"