|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.chainedoptions.support.ExtraItemsStrategy
public class ExtraItemsStrategy
Strategy that adds a set of extra items to a given list of options. The set of extra items is configurable. The strategy also provides a default value, which is also configurable.
Constructor Summary | |
---|---|
ExtraItemsStrategy()
|
Method Summary | |
---|---|
java.util.List |
adjustAndSort(java.util.List options,
java.lang.Object context)
Sorts the given list of options. |
void |
afterPropertiesSet()
|
LabelValueBean |
getDefaultItem()
The default item is the item in the list that should be selected when the list is first displayed. |
java.lang.String |
getDefaultValue(java.util.List options,
java.lang.Object context)
Provides the default value of the given list of options. |
void |
setDefaultItem(LabelValueBean defaultItem)
The default item is the item in the list that should be selected when the list is first displayed. |
void |
setExtraItems(java.util.List extraItems)
Extra items are items that signify special values, like ANY, EMPTY, NOCHANGE etc. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ExtraItemsStrategy()
Method Detail |
---|
public java.util.List adjustAndSort(java.util.List options, java.lang.Object context)
ChainedOptionStrategy
adjustAndSort
in interface ChainedOptionStrategy
options
- List of LabelValueBean objects to adjust and sort.context
- may contain any context that might be interesting for the
Strategy for fitering or adding values. E.g. the Request
object might be passed as context for the Strategy in order to
hide some options depending on user access.
LabelValueBean
public java.lang.String getDefaultValue(java.util.List options, java.lang.Object context)
ChainedOptionStrategy
getDefaultValue
in interface ChainedOptionStrategy
options
- List of LabelValueBean objects where the default value must be
found.context
- may contain any context that might be interesting for the
Strategy to select the default value.
public void setExtraItems(java.util.List extraItems)
extraItems
- The extra items to set as a list of LabelValueBean objects.public LabelValueBean getDefaultItem()
public void setDefaultItem(LabelValueBean defaultItem)
defaultItem
- The default item to set as a LabelValueBean.public void afterPropertiesSet() throws java.lang.Exception
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
java.lang.Exception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |