|
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.SingleSelectionBean
This bean is not supported on the following agent types: pda.
The SingleSelectionBean provides single-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 multiple-selection table, use the MultipleSelectionBean instead.
Adding a SingleSelectionBean 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 radio button 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 SingleSelectionBean is present in the Table. The text displayed in the control
bar is the value of the SingleSelectionBean's text
property. Additionally, any indexed children of the SingleSelectionBean 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 SingleSelectionBean is specified via a
selectedIndex
property. This should be set to either
a known, zero-based index indicating the initially selected table row, or
a bound Integer which can be retrieved using the key set as the
selectedIndexBinding
property.
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. The DataObject
queried for the disabled status is the table's data content DataObjectList.
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 static method getSelectedIndex()
to be used to easily determine which row 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 number which was selected by calling
getSelectedIndex()
with that DataSet.
In the following example, the third row will be preselected
<table ...> <tableSelection> <singleSelection text="Select an item and ..." selectedIndex="2"> <contents> <submitButton text="Copy"/> </contents> </singleSelection> </tableSelection> </table>
UIConstants
,
TableBean
,
MultipleSelectionBean
Constructor Summary | |
|
SingleSelectionBean()
Construct an instance of the SingleSelectionBean. |
protected |
SingleSelectionBean(boolean ignored,
java.lang.String localName)
Construct an instance of the SingleSelectionBean. |
|
SingleSelectionBean(int selectedIndex,
java.lang.String text)
Construct an instance of the SingleSelectionBean. |
Method Summary | |
int |
getSelectedIndex()
Gets the zero-based index initially selected. |
static int |
getSelectedIndex(DataObject servletRequestObject)
Return a zero-based integer indicating which row in a single-selection table was selected. |
static int |
getSelectedIndex(MutableUINode bean)
Gets the zero-based index initially selected. |
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 single selection should be disabled. |
static boolean |
isDisabled(MutableUINode bean)
Gets whether or not this single selection should be disabled. |
void |
setDisabled(boolean disabled)
Sets whether or not this single selection should be disabled. |
static void |
setDisabled(MutableUINode bean,
boolean disabled)
Sets whether or not this single selection should be disabled. |
void |
setDisabledBinding(BoundValue boundValue)
Binds the whether or not this single selection should be disabled. |
static void |
setDisabledBinding(MutableUINode bean,
BoundValue boundValue)
Binds the whether or not this single selection should be disabled. |
static void |
setDisabledBinding(MutableUINode bean,
java.lang.Object selectKey)
Binds the whether or not this single 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 single selection should be disabled. |
void |
setDisabledBinding(java.lang.Object selectKey)
Binds the whether or not this single selection should be disabled. |
void |
setDisabledBinding(java.lang.String dataNamespace,
java.lang.String dataName,
java.lang.Object selectKey)
Binds the whether or not this single selection should be disabled. |
void |
setSelectedIndex(int selectedIndex)
Sets the zero-based index initially selected. |
static void |
setSelectedIndex(MutableUINode bean,
int selectedIndex)
Sets the zero-based index initially selected. |
void |
setSelectedIndexBinding(BoundValue boundValue)
Binds the the zero-based index initially selected. |
static void |
setSelectedIndexBinding(MutableUINode bean,
BoundValue boundValue)
Binds the the zero-based index initially selected. |
static void |
setSelectedIndexBinding(MutableUINode bean,
java.lang.Object selectKey)
Binds the the zero-based index initially selected. |
static void |
setSelectedIndexBinding(MutableUINode bean,
java.lang.String dataNamespace,
java.lang.String dataName,
java.lang.Object selectKey)
Binds the the zero-based index initially selected. |
void |
setSelectedIndexBinding(java.lang.Object selectKey)
Binds the the zero-based index initially selected. |
void |
setSelectedIndexBinding(java.lang.String dataNamespace,
java.lang.String dataName,
java.lang.Object selectKey)
Binds the the zero-based index initially selected. |
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 SingleSelectionBean()
public SingleSelectionBean(int selectedIndex, java.lang.String text)
selectedIndex
- the zero-based index initially selected.text
- the text to display in the control bar.protected SingleSelectionBean(boolean ignored, java.lang.String localName)
Method Detail |
public static int getSelectedIndex(DataObject servletRequestObject)
servletRequestObject
- a DataObject (usually a ServletRequestDataSet)
constructed with the name of the TableBean to be queried.public final int getSelectedIndex()
public final void setSelectedIndex(int selectedIndex)
public final void setSelectedIndexBinding(BoundValue boundValue)
boundValue
- a BoundValue implementation to be used
to retrieve the value.public final void setSelectedIndexBinding(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 setSelectedIndexBinding(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 int getSelectedIndex(MutableUINode bean)
public static void setSelectedIndex(MutableUINode bean, int selectedIndex)
public static void setSelectedIndexBinding(MutableUINode bean, BoundValue boundValue)
boundValue
- a BoundValue implementation to be used
to retrieve the value.public static void setSelectedIndexBinding(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 setSelectedIndexBinding(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 |