|
Oracle UIX API Reference Release 2.1.22.0.0 B12196-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--oracle.cabo.ui.DeprecatedUINode | +--oracle.cabo.ui.BaseUINode | +--oracle.cabo.ui.BaseMutableUINode | +--oracle.cabo.ui.beans.BaseWebBean | +--oracle.cabo.ui.beans.MarlinBean | +--oracle.cabo.ui.beans.table.MultipleSelectionBean
This bean is not supported on the following agent types: pda.
The MultipleSelectionBean provides multi-selection for
TableBeans. It is only useful in the context
of a TableBean, and should be initialized and set on the
TableBean as the tableSelection
property. For
a single-selection table, use the SingleSelectionBean instead.
Adding a MultipleSelectionBean to a Table causes the table to render both a selection column in the Table and a control bar surrounding the table contents, as specified by the Oracle UI guidelines. The selection is represented by a checkbox column rendered into the table without any additional work done by clients.
The control bar rendered above and below the Table appears automatically when
a MultipleSelectionBean is present in the Table. The text displayed in the
control bar is the value of the MultipleSelectionBean's
text
property. Additionally,
any indexed children of the MultipleSelectionBean are rendered into the control
bar on the right side. Together, these properties allow clients to easily
create the control bars specified by the Oracle UI guidelines: a brief text
message accompanied by action buttons which act on the selected row(s) of the
table.
The initial selection state of a MultipleSelectionBean is retrieved by a
DataObjectList whose DataObjects map to the rows in the table. This
DataObjectList is specified by setting the selection
property. If this DataObjectList is not specified, the same DataObjectList
used to generate data in the table itself is used.
For each row in the table, the selection DataObjectList must return a DataObject
which can be queried for the selected status of its corresponding row. The key
used to query each DataObject must be set using the
selectedBinding
property. If a row DataObject returns
Boolean.TRUE when queried with the value of the
selectedBinding
property, then that row will be
initially selected. Otherwise, that row will be initially deselected.
Rows in the selection can be disabled, which makes them
unable to be selected. To accomplish this, simply set the
disabled
property to return true. However, in most
cases only certain rows will want to be marked as unselectable. In those
cases, simply bind the disabled
property to return
"true" for those DataObject rows which should be disabled. Note that, as
mentioned above, the selection
DataObjectList will
first be checked for this property, and if the selection
is not specified, the table's own DataObjectList will be queried.
The results of a user's selection are stored in a page via well-known
form elements based on the row and the name of the table containing them. This
allows the utility class ServletRequestDataSet
to be used to easily determine which row(s) the user selected
at the time of the form submission. Clients can construct a
ServletRequestDataSet using a ServletRequest and the name of the TableBean,
and retrieve the zero-based row numbers which were selected by calling
getSelectedIndices()
with that DataSet.
<table ... > <tableSelection> <multipleSelection text="Select Items and ..."> <contents> <submitButton text="Delete"/> </contents> </multipleSelection> </tableSelection> </table>
UIConstants
,
TableBean
,
SingleSelectionBean
Constructor Summary | |
|
MultipleSelectionBean()
Construct an instance of the MultipleSelectionBean. |
protected |
MultipleSelectionBean(boolean ignored,
java.lang.String localName)
Construct an instance of the MultipleSelectionBean. |
|
MultipleSelectionBean(DataObjectList selection,
java.lang.String text)
Construct an instance of the MultipleSelectionBean. |
|
MultipleSelectionBean(DataObjectList selection,
java.lang.String text)
Deprecated. since 2.0. |
|
MultipleSelectionBean(java.lang.String text)
Construct an instance of the MultipleSelectionBean. |
Method Summary | |
static int[] |
getSelectedIndices(DataObjectList servletRequestSet)
Return an array of integers of those rows which were marked as selected. |
DataObjectList |
getSelection()
Gets the DataObjectList representing the original selection status of each row. |
static DataObjectList |
getSelection(MutableUINode bean)
Gets the DataObjectList representing the original selection status of each row. |
java.lang.String |
getText()
Gets the text to display in the control bar. |
static java.lang.String |
getText(MutableUINode bean)
Gets the text to display in the control bar. |
boolean |
isDisabled()
Gets whether or not this multiple selection should be disabled. |
static boolean |
isDisabled(MutableUINode bean)
Gets whether or not this multiple selection should be disabled. |
boolean |
isSelected()
Gets initial selection of a table row; generally, this attribute will be databound to the current DataObject, so it can pull selection state from the "selection" DataObjectList. |
static boolean |
isSelected(MutableUINode bean)
Gets initial selection of a table row; generally, this attribute will be databound to the current DataObject, so it can pull selection state from the "selection" DataObjectList. |
void |
setDisabled(boolean disabled)
Sets whether or not this multiple selection should be disabled. |
static void |
setDisabled(MutableUINode bean,
boolean disabled)
Sets whether or not this multiple selection should be disabled. |
void |
setDisabledBinding(BoundValue boundValue)
Binds the whether or not this multiple selection should be disabled. |
static void |
setDisabledBinding(MutableUINode bean,
BoundValue boundValue)
Binds the whether or not this multiple selection should be disabled. |
static void |
setDisabledBinding(MutableUINode bean,
java.lang.Object selectKey)
Binds the whether or not this multiple selection should be disabled. |
static void |
setDisabledBinding(MutableUINode bean,
java.lang.String dataNamespace,
java.lang.String dataName,
java.lang.Object selectKey)
Binds the whether or not this multiple selection should be disabled. |
void |
setDisabledBinding(java.lang.Object selectKey)
Binds the whether or not this multiple selection should be disabled. |
void |
setDisabledBinding(java.lang.String dataNamespace,
java.lang.String dataName,
java.lang.Object selectKey)
Binds the whether or not this multiple selection should be disabled. |
void |
setSelected(boolean selected)
Sets initial selection of a table row; generally, this attribute will be databound to the current DataObject, so it can pull selection state from the "selection" DataObjectList. |
static void |
setSelected(MutableUINode bean,
boolean selected)
Sets initial selection of a table row; generally, this attribute will be databound to the current DataObject, so it can pull selection state from the "selection" DataObjectList. |
void |
setSelectedBinding(BoundValue boundValue)
Binds the initial selection of a table row; generally, this attribute will be databound to the current DataObject, so it can pull selection state from the "selection" DataObjectList. |
static void |
setSelectedBinding(MutableUINode bean,
BoundValue boundValue)
Binds the initial selection of a table row; generally, this attribute will be databound to the current DataObject, so it can pull selection state from the "selection" DataObjectList. |
static void |
setSelectedBinding(MutableUINode bean,
java.lang.Object selectKey)
Binds the initial selection of a table row; generally, this attribute will be databound to the current DataObject, so it can pull selection state from the "selection" DataObjectList. |
static void |
setSelectedBinding(MutableUINode bean,
java.lang.String dataNamespace,
java.lang.String dataName,
java.lang.Object selectKey)
Binds the initial selection of a table row; generally, this attribute will be databound to the current DataObject, so it can pull selection state from the "selection" DataObjectList. |
void |
setSelectedBinding(java.lang.Object selectKey)
Binds the initial selection of a table row; generally, this attribute will be databound to the current DataObject, so it can pull selection state from the "selection" DataObjectList. |
void |
setSelectedBinding(java.lang.String dataNamespace,
java.lang.String dataName,
java.lang.Object selectKey)
Binds the initial selection of a table row; generally, this attribute will be databound to the current DataObject, so it can pull selection state from the "selection" DataObjectList. |
void |
setSelection(DataObjectList selection)
Sets the DataObjectList representing the original selection status of each row. |
void |
setSelection(DataObjectList selection)
Deprecated. since 2.0; please use the non-deprecated version of this function. |
static void |
setSelection(MutableUINode bean,
DataObjectList selection)
Sets the DataObjectList representing the original selection status of each row. |
static void |
setSelection(MutableUINode bean,
DataObjectList selection)
Deprecated. since 2.0; please use the non-deprecated version of this function. |
static void |
setText(MutableUINode bean,
java.lang.String text)
Sets the text to display in the control bar. |
void |
setText(java.lang.String text)
Sets the text to display in the control bar. |
static void |
setTranslatableText(MutableUINode bean,
java.lang.String bundleName,
java.lang.String key)
Binds to a ResourceBundle the the text to display in the control bar. |
void |
setTranslatableText(java.lang.String bundleName,
java.lang.String key)
Binds to a ResourceBundle the the text to display in the control bar. |
Methods inherited from class oracle.cabo.ui.beans.MarlinBean |
isEqualMarlinName |
Methods inherited from class oracle.cabo.ui.BaseUINode |
getAttributeNames, getAttributeValue, getAttributeValueImpl, getChildArray, getChildNames, getIndexedChild, getIndexedChild, getIndexedChildCount, getLocalName, getNamedChild, getNamespaceURI, getNodeID, getNodeRole, getPreorderDescendentAttributeValue, getRawAttributeValue, getRenderedUINode, getRenderer, getRenderer, render, render, toString |
Methods inherited from class oracle.cabo.ui.DeprecatedUINode |
getAttributeValue, getChildNames, getNamedChild |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface oracle.cabo.ui.UINode |
getAttributeNames, getAttributeValue, getAttributeValue, getChildNames, getChildNames, getIndexedChild, getIndexedChild, getIndexedChildCount, getLocalName, getNamedChild, getNamedChild, getNamespaceURI, getNodeID, getNodeRole, getRawAttributeValue, render, render |
Constructor Detail |
public MultipleSelectionBean()
public MultipleSelectionBean(DataObjectList selection, java.lang.String text)
selection
- the DataObjectList representing the original selection
status of each row.text
- the text to display in the control bar.public MultipleSelectionBean(DataObjectList selection, java.lang.String text)
selection
- the DataObjectList representing the original selection
status of each row.text
- the text to display in the control bar.public MultipleSelectionBean(java.lang.String text)
text
- the text to display in the control bar.protected MultipleSelectionBean(boolean ignored, java.lang.String localName)
Method Detail |
public static int[] getSelectedIndices(DataObjectList servletRequestSet)
servletRequestSet
- a DataObjectList
(usually a ServletRequestDataSet) constructed with the name
of the TableBean to be queried for selection.public final DataObjectList getSelection()
public final void setSelection(DataObjectList selection)
public final void setSelection(DataObjectList selection)
public final boolean isSelected()
public final void setSelected(boolean selected)
public final void setSelectedBinding(BoundValue boundValue)
boundValue
- a BoundValue implementation to be used
to retrieve the value.public final void setSelectedBinding(java.lang.Object selectKey)
selectKey
- the key to be passed to selectValue()
on the
current DataObject
, e.g., the DataObject for the current
table row.public final void setSelectedBinding(java.lang.String dataNamespace, java.lang.String dataName, java.lang.Object selectKey)
dataNamespace
- the namespace to be passed to
RenderingContext.getDataObject()
dataName
- the name to be passed to
RenderingContext.getDataObject()
selectKey
- the key to be passed to selectValue()
on the
DataObject
.public final java.lang.String getText()
public final void setText(java.lang.String text)
public final void setTranslatableText(java.lang.String bundleName, java.lang.String key)
bundleName
- the name of the ResourceBundlekey
- the key of the string to retrieve from the ResourceBundlepublic final boolean isDisabled()
public final void setDisabled(boolean disabled)
public final void setDisabledBinding(BoundValue boundValue)
boundValue
- a BoundValue implementation to be used
to retrieve the value.public final void setDisabledBinding(java.lang.Object selectKey)
selectKey
- the key to be passed to selectValue()
on the
current DataObject
, e.g., the DataObject for the current
table row.public final void setDisabledBinding(java.lang.String dataNamespace, java.lang.String dataName, java.lang.Object selectKey)
dataNamespace
- the namespace to be passed to
RenderingContext.getDataObject()
dataName
- the name to be passed to
RenderingContext.getDataObject()
selectKey
- the key to be passed to selectValue()
on the
DataObject
.public static DataObjectList getSelection(MutableUINode bean)
public static void setSelection(MutableUINode bean, DataObjectList selection)
public static void setSelection(MutableUINode bean, DataObjectList selection)
public static boolean isSelected(MutableUINode bean)
public static void setSelected(MutableUINode bean, boolean selected)
public static void setSelectedBinding(MutableUINode bean, BoundValue boundValue)
boundValue
- a BoundValue implementation to be used
to retrieve the value.public static void setSelectedBinding(MutableUINode bean, java.lang.Object selectKey)
selectKey
- the key to be passed to selectValue()
on the
current DataObject
, e.g., the DataObject for the current
table row.public static void setSelectedBinding(MutableUINode bean, java.lang.String dataNamespace, java.lang.String dataName, java.lang.Object selectKey)
dataNamespace
- the namespace to be passed to
RenderingContext.getDataObject()
dataName
- the name to be passed to
RenderingContext.getDataObject()
selectKey
- the key to be passed to selectValue()
on the
DataObject
.public static java.lang.String getText(MutableUINode bean)
public static void setText(MutableUINode bean, java.lang.String text)
public static void setTranslatableText(MutableUINode bean, java.lang.String bundleName, java.lang.String key)
bundleName
- the name of the ResourceBundlekey
- the key of the string to retrieve from the ResourceBundlepublic static boolean isDisabled(MutableUINode bean)
public static void setDisabled(MutableUINode bean, boolean disabled)
public static void setDisabledBinding(MutableUINode bean, BoundValue boundValue)
boundValue
- a BoundValue implementation to be used
to retrieve the value.public static void setDisabledBinding(MutableUINode bean, java.lang.Object selectKey)
selectKey
- the key to be passed to selectValue()
on the
current DataObject
, e.g., the DataObject for the current
table row.public static void setDisabledBinding(MutableUINode bean, java.lang.String dataNamespace, java.lang.String dataName, java.lang.Object selectKey)
dataNamespace
- the namespace to be passed to
RenderingContext.getDataObject()
dataName
- the name to be passed to
RenderingContext.getDataObject()
selectKey
- the key to be passed to selectValue()
on the
DataObject
.
|
Oracle UIX API Reference Release 2.1.22.0.0 B12196-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |