Class BoundPropertiesSelectItemGroupProvider
java.lang.Object
javax.faces.model.SelectItem
com.webmethods.caf.faces.data.object.BoundPropertiesSelectItemGroupProvider
- All Implemented Interfaces:
ISelectItemGroupProvider
,ISelectItemProvider
,Serializable
public class BoundPropertiesSelectItemGroupProvider
extends SelectItem
implements Serializable, ISelectItemGroupProvider
Adapts a ITableContentProvider
, List
or array to an
ISelectItemGroupProvider
.
A binding expression for either the label or value must be defined. If only one of the is defined, it will be used for both label and value.
the the same It value field name is not defined, label field value is used for the select item value.The following demonstrates creating a new instance of this class,
initialized with an array of MyItem
objects,
with the value of the group's items bound to the myValue
property,
and the label of the group's items bound to the myLabel
property:
class MyItem { public int getMyValue(); public String getMyLabel(); }; MyItem[] items = new MyItems[] {....}; ISelectItemGroupProvider provider = new BoundPropertiesSelectItemGroupProvider(items, "item", "#{item.myValue}", "#{item.myLabel}"); Collection selectItems = provider.getSelectItemContentProviders(); for (java.util.Iterator i = selectItems(); i.hasNext(); ) { ISelectItemProvider selectItem = (ISelectItemProvider) i.next(); String label = selectItem.getLabel(); // returns value of "myLabel" property for each item Object value = selectItem.getValue(); // returns value of "myValue" property for each item }
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected class
protected class
protected class
protected class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Object[]
protected boolean
protected ValueExpression
protected ValueExpression
protected ValueExpression
protected ValueExpression
protected ValueExpression
protected ValueExpression
protected ValueExpression
protected ITableContentProvider
protected ValueExpression
protected String
-
Constructor Summary
ConstructorsConstructorDescriptionCreates new uninitialized provider.BoundPropertiesSelectItemGroupProvider
(ITableContentProvider table, String rowVariable, String valueBindingExpression) Creates a new provider to provide select-items from the specified table, with the select-item's value derived from the specified binding expressions.BoundPropertiesSelectItemGroupProvider
(ITableContentProvider table, String rowVariable, String valueBindingExpression, String labelBindingExpression) Creates a new provider to provide select-items from the specified table, with the select-item's value and label derived from the specified binding expressions.BoundPropertiesSelectItemGroupProvider
(ITableContentProvider table, String rowVariable, String valueBindingExpression, String labelBindingExpression, String descriptionBindingExpression, String disabledBindingExpression, String styleBindingExpression, String iconBindingExpression) Creates a new provider to provide select-items from the specified table, with the select-item's value, label, description, disabled state, css style, and icon derived from the specified binding expressions.BoundPropertiesSelectItemGroupProvider
(Object[] array, String rowVariable, String valueBindingExpression) Creates a new provider to provide select-items from the specified array, with the select-item's value derived from the specified binding expressions.BoundPropertiesSelectItemGroupProvider
(Object[] array, String rowVariable, String valueBindingExpression, String labelBindingExpression) Creates a new provider to provide select-items from the specified array, with the select-item's value and label derived from the specified binding expressions.BoundPropertiesSelectItemGroupProvider
(Object[] array, String rowVariable, String valueBindingExpression, String labelBindingExpression, String descriptionBindingExpression, String disabledBindingExpression, String styleBindingExpression, String iconBindingExpression) Creates a new provider to provide select-items from the specified array, with the select-item's value, label, description, disabled state, css style, and icon derived from the specified binding expressions.BoundPropertiesSelectItemGroupProvider
(List<?> list, String rowVariable, String valueBindingExpression) Creates a new provider to provide select-items from the specified list, with the select-item's value derived from the specified binding expressions.BoundPropertiesSelectItemGroupProvider
(List<?> list, String rowVariable, String valueBindingExpression, String labelBindingExpression) Creates a new provider to provide select-items from the specified list, with the select-item's value and label derived from the specified binding expressions.BoundPropertiesSelectItemGroupProvider
(List<?> list, String rowVariable, String valueBindingExpression, String labelBindingExpression, String descriptionBindingExpression, String disabledBindingExpression, String styleBindingExpression, String iconBindingExpression) Creates a new provider to provide select-items from the specified list, with the select-item's value, label, description, disabled state, css style, and icon derived from the specified binding expressions. -
Method Summary
Modifier and TypeMethodDescriptionObject[]
getArray()
Always return null.Deprecated.Deprecated.usegetDisabledExpression()
insteadDeprecated.usegetEscapeExpression()
insteadgetIcon()
Always return null.Deprecated.usegetIconExpression()
insteadgetLabel()
Always return null.Deprecated.usegetLabelExpression()
insteadgetList()
Returns a collection ofISelectItemProvider
s.getSort()
Deprecated.usesetSortExpression(ValueExpression)
insteadgetStyle()
Always return null.Deprecated.usegetStyleExpression()
insteadgetTable()
getValue()
Always return null.Deprecated.usegetValueExpression()
insteadboolean
boolean
Always return false.void
void
setAscending
(boolean ascending) void
Deprecated.usesetDescriptionExpression(ValueExpression)
insteadvoid
void
Deprecated.usesetDisabledExpression(ValueExpression)
insteadvoid
void
Deprecated.usesetEscapeExpression(ValueExpression)
insteadvoid
void
Deprecated.usesetIconExpression(ValueExpression)
insteadvoid
void
Deprecated.usesetLabelExpression(ValueExpression)
insteadvoid
void
void
setRowVariable
(String var) void
setSort
(ValueBinding sort) Deprecated.usesetSortExpression(ValueExpression)
insteadvoid
void
Deprecated.usesetStyleExpression(ValueExpression)
insteadvoid
void
setTable
(ITableContentProvider table) void
Deprecated.usesetValueExpression(ValueExpression)
insteadvoid
Methods inherited from class javax.faces.model.SelectItem
isEscape, isNoSelectionOption, setDescription, setDisabled, setEscape, setLabel, setNoSelectionOption, setValue
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.webmethods.caf.faces.data.ISelectItemProvider
isEscape
-
Field Details
-
m_table
-
m_list
-
m_array
-
m_description
-
m_disabled
-
m_icon
-
m_label
-
m_style
-
m_value
-
m_escape
-
m_var
-
m_sort
-
m_ascending
protected boolean m_ascending
-
-
Constructor Details
-
BoundPropertiesSelectItemGroupProvider
public BoundPropertiesSelectItemGroupProvider()Creates new uninitialized provider. Must be initialized with at least a row variable; either a table, list, or array; and a value binding-expression. -
BoundPropertiesSelectItemGroupProvider
public BoundPropertiesSelectItemGroupProvider(ITableContentProvider table, String rowVariable, String valueBindingExpression) Creates a new provider to provide select-items from the specified table, with the select-item's value derived from the specified binding expressions. -
BoundPropertiesSelectItemGroupProvider
public BoundPropertiesSelectItemGroupProvider(ITableContentProvider table, String rowVariable, String valueBindingExpression, String labelBindingExpression) Creates a new provider to provide select-items from the specified table, with the select-item's value and label derived from the specified binding expressions. -
BoundPropertiesSelectItemGroupProvider
public BoundPropertiesSelectItemGroupProvider(ITableContentProvider table, String rowVariable, String valueBindingExpression, String labelBindingExpression, String descriptionBindingExpression, String disabledBindingExpression, String styleBindingExpression, String iconBindingExpression) Creates a new provider to provide select-items from the specified table, with the select-item's value, label, description, disabled state, css style, and icon derived from the specified binding expressions. All binding expressions except value may be null. -
BoundPropertiesSelectItemGroupProvider
public BoundPropertiesSelectItemGroupProvider(List<?> list, String rowVariable, String valueBindingExpression) Creates a new provider to provide select-items from the specified list, with the select-item's value derived from the specified binding expressions. -
BoundPropertiesSelectItemGroupProvider
public BoundPropertiesSelectItemGroupProvider(List<?> list, String rowVariable, String valueBindingExpression, String labelBindingExpression) Creates a new provider to provide select-items from the specified list, with the select-item's value and label derived from the specified binding expressions. -
BoundPropertiesSelectItemGroupProvider
public BoundPropertiesSelectItemGroupProvider(List<?> list, String rowVariable, String valueBindingExpression, String labelBindingExpression, String descriptionBindingExpression, String disabledBindingExpression, String styleBindingExpression, String iconBindingExpression) Creates a new provider to provide select-items from the specified list, with the select-item's value, label, description, disabled state, css style, and icon derived from the specified binding expressions. All binding expressions except value may be null. -
BoundPropertiesSelectItemGroupProvider
public BoundPropertiesSelectItemGroupProvider(Object[] array, String rowVariable, String valueBindingExpression) Creates a new provider to provide select-items from the specified array, with the select-item's value derived from the specified binding expressions. -
BoundPropertiesSelectItemGroupProvider
public BoundPropertiesSelectItemGroupProvider(Object[] array, String rowVariable, String valueBindingExpression, String labelBindingExpression) Creates a new provider to provide select-items from the specified array, with the select-item's value and label derived from the specified binding expressions. -
BoundPropertiesSelectItemGroupProvider
public BoundPropertiesSelectItemGroupProvider(Object[] array, String rowVariable, String valueBindingExpression, String labelBindingExpression, String descriptionBindingExpression, String disabledBindingExpression, String styleBindingExpression, String iconBindingExpression) Creates a new provider to provide select-items from the specified array, with the select-item's value, label, description, disabled state, css style, and icon derived from the specified binding expressions. All binding expressions except value may be null.
-
-
Method Details
-
getSelectItemContentProviders
Description copied from interface:ISelectItemGroupProvider
Returns a collection ofISelectItemProvider
s.- Specified by:
getSelectItemContentProviders
in interfaceISelectItemGroupProvider
- Returns:
- collectio of individual select items
-
getDescription
Always return null.- Specified by:
getDescription
in interfaceISelectItemProvider
- Overrides:
getDescription
in classSelectItem
- Returns:
- item's description
-
getIcon
Always return null.- Specified by:
getIcon
in interfaceISelectItemProvider
- Returns:
- icon url
-
getLabel
Always return null.- Specified by:
getLabel
in interfaceISelectItemProvider
- Overrides:
getLabel
in classSelectItem
- Returns:
- item's label
-
getStyle
Always return null.- Specified by:
getStyle
in interfaceISelectItemProvider
- Returns:
- items's CSS style
-
getValue
Always return null.- Specified by:
getValue
in interfaceISelectItemProvider
- Overrides:
getValue
in classSelectItem
- Returns:
- item's value
-
isDisabled
public boolean isDisabled()Always return false.- Specified by:
isDisabled
in interfaceISelectItemProvider
- Overrides:
isDisabled
in classSelectItem
- Returns:
- disabled status
-
getArray
-
setArray
-
isAscending
public boolean isAscending() -
setAscending
public void setAscending(boolean ascending) -
getList
-
setList
-
getSort
Deprecated.usesetSortExpression(ValueExpression)
instead -
setSort
Deprecated.usesetSortExpression(ValueExpression)
instead -
getSortExpression
-
setSortExpression
-
getTable
-
setTable
-
getRowVariable
-
setRowVariable
-
getDescriptionBinding
Deprecated.usegetDescriptionExpression()
instead -
setDescriptionBinding
Deprecated.usesetDescriptionExpression(ValueExpression)
instead -
getDescriptionExpression
-
setDescriptionExpression
-
getDisabledBinding
Deprecated.usegetDisabledExpression()
instead -
setDisabledBinding
Deprecated.usesetDisabledExpression(ValueExpression)
instead -
getDisabledExpression
-
setDisabledExpression
-
getIconBinding
Deprecated.usegetIconExpression()
instead -
setIconBinding
Deprecated.usesetIconExpression(ValueExpression)
instead -
getIconExpression
-
setIconExpression
-
getLabelBinding
Deprecated.usegetLabelExpression()
instead -
setLabelBinding
Deprecated.usesetLabelExpression(ValueExpression)
instead -
getLabelExpression
-
setLabelExpression
-
getStyleBinding
Deprecated.usegetStyleExpression()
instead -
setStyleBinding
Deprecated.usesetStyleExpression(ValueExpression)
instead -
getStyleExpression
-
setStyleExpression
-
getValueBinding
Deprecated.usegetValueExpression()
instead -
setValueBinding
Deprecated.usesetValueExpression(ValueExpression)
instead -
getValueExpression
-
setValueExpression
-
getEscapeBinding
Deprecated.usegetEscapeExpression()
instead -
setEscapeBinding
Deprecated.usesetEscapeExpression(ValueExpression)
instead -
getEscapeExpression
-
setEscapeExpression
-
getDescriptionExpression()
instead