|
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.SwitcherBean
The Switcher bean can be used to switch between one of a set of beans. It has one property, "childName"; the bean will render the named child under this name. It's possible to achieve this same functionality by using a FlowLayout and binding the "rendered" property of each indexed child, but this approach is simpler. Indexed children of the Switcher bean are not rendered at all. This class is derived from MarlinBean for backwards-compatibility only. The only methods supported are those found on BaseMutableUINode.
<switcher data:childName="person@userData" childName="default"> <case name="default"> You have not picked anyone </case> <case name="Roger"> You have picked Roger </case> <case name="Peter"> You have picked Peter </case> </switcher> <switcher data:childName="person@userData" defaultCase="defCase"> <case name="defCase"> You have not picked anyone </case> <case name="Roger"> You have picked Roger </case> <case name="Peter"> You have picked Peter </case> </switcher> <switcher data:childName="person@userData"> <default> You have not picked anyone </case> <case name="Roger"> You have picked Roger </case> <case name="Peter"> You have picked Peter </case> </switcher>
Constructor Summary | |
|
SwitcherBean()
Construct an instance of the SwitcherBean. |
protected |
SwitcherBean(boolean ignored,
java.lang.String localName)
Construct an instance of the SwitcherBean. |
Method Summary | |
java.lang.String |
getChildName()
Gets At rendering time, the value of the childName attribute is compared to the name attribute of each of the case elements. |
static java.lang.String |
getChildName(MutableUINode bean)
Gets At rendering time, the value of the childName attribute is compared to the name attribute of each of the case elements. |
java.lang.String |
getDefaultCase()
Gets This attribute names the case element which should be rendered if the childName does not match any other case element names. |
static java.lang.String |
getDefaultCase(MutableUINode bean)
Gets This attribute names the case element which should be rendered if the childName does not match any other case element names. |
static void |
setChildName(MutableUINode bean,
java.lang.String childName)
Sets At rendering time, the value of the childName attribute is compared to the name attribute of each of the case elements. |
void |
setChildName(java.lang.String childName)
Sets At rendering time, the value of the childName attribute is compared to the name attribute of each of the case elements. |
void |
setChildNameBinding(BoundValue boundValue)
Binds the At rendering time, the value of the childName attribute is compared to the name attribute of each of the case elements. |
static void |
setChildNameBinding(MutableUINode bean,
BoundValue boundValue)
Binds the At rendering time, the value of the childName attribute is compared to the name attribute of each of the case elements. |
static void |
setChildNameBinding(MutableUINode bean,
java.lang.Object selectKey)
Binds the At rendering time, the value of the childName attribute is compared to the name attribute of each of the case elements. |
static void |
setChildNameBinding(MutableUINode bean,
java.lang.String dataNamespace,
java.lang.String dataName,
java.lang.Object selectKey)
Binds the At rendering time, the value of the childName attribute is compared to the name attribute of each of the case elements. |
void |
setChildNameBinding(java.lang.Object selectKey)
Binds the At rendering time, the value of the childName attribute is compared to the name attribute of each of the case elements. |
void |
setChildNameBinding(java.lang.String dataNamespace,
java.lang.String dataName,
java.lang.Object selectKey)
Binds the At rendering time, the value of the childName attribute is compared to the name attribute of each of the case elements. |
static void |
setDefault(MutableUINode bean,
UINode defaultNode)
Sets the default case element to be the given node |
void |
setDefault(UINode defaultNode)
Sets the default case element to be the given node |
static void |
setDefaultCase(MutableUINode bean,
java.lang.String defaultCase)
Sets This attribute names the case element which should be rendered if the childName does not match any other case element names. |
void |
setDefaultCase(java.lang.String defaultCase)
Sets This attribute names the case element which should be rendered if the childName does not match any other case element names. |
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 SwitcherBean()
protected SwitcherBean(boolean ignored, java.lang.String localName)
Method Detail |
public final void setDefault(UINode defaultNode)
defaultNode
- a UINode that will be rendered if the childName
does not match any other case elementpublic static final void setDefault(MutableUINode bean, UINode defaultNode)
bean
- the UINode on which the default node is to be setdefaultNode
- a UINode that will be rendered if the childName
does not match any other case elementpublic final java.lang.String getChildName()
This is a required property on the bean.
public final void setChildName(java.lang.String childName)
This is a required property on the bean.
public final void setChildNameBinding(BoundValue boundValue)
This is a required property on the bean.
boundValue
- a BoundValue implementation to be used
to retrieve the value.public final void setChildNameBinding(java.lang.Object selectKey)
This is a required property on the bean.
selectKey
- the key to be passed to selectValue()
on the
current DataObject
, e.g., the DataObject for the current
table row.public final void setChildNameBinding(java.lang.String dataNamespace, java.lang.String dataName, java.lang.Object selectKey)
This is a required property on the bean.
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 getDefaultCase()
public final void setDefaultCase(java.lang.String defaultCase)
public static java.lang.String getChildName(MutableUINode bean)
This is a required property on the bean.
public static void setChildName(MutableUINode bean, java.lang.String childName)
This is a required property on the bean.
public static void setChildNameBinding(MutableUINode bean, BoundValue boundValue)
This is a required property on the bean.
boundValue
- a BoundValue implementation to be used
to retrieve the value.public static void setChildNameBinding(MutableUINode bean, java.lang.Object selectKey)
This is a required property on the bean.
selectKey
- the key to be passed to selectValue()
on the
current DataObject
, e.g., the DataObject for the current
table row.public static void setChildNameBinding(MutableUINode bean, java.lang.String dataNamespace, java.lang.String dataName, java.lang.Object selectKey)
This is a required property on the bean.
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 getDefaultCase(MutableUINode bean)
public static void setDefaultCase(MutableUINode bean, java.lang.String defaultCase)
|
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 |