oracle.cabo.ui.data.bind
Class CompareAttrBoundValue
java.lang.Object
|
+--oracle.cabo.ui.data.bind.CompareAttrBoundValue
- All Implemented Interfaces:
- BoundValue
- Direct Known Subclasses:
- CompareAttrBoundValue
- public class CompareAttrBoundValue
- extends java.lang.Object
- implements BoundValue
A BoundValue implementation that compares an attribute on a UINode with a value returned from another BoundValue. If the two are equal, this returns Boolean.TRUE. Otherwise, it returns null.
This implementation is extremely useful for binding the "selected" attribute for OptionBean
or RadioButtonBean
, since clients store the bean value that should be selected on a DataObject
, instead of needing to store separate booleans for each possible value. It can, of course, be used for any boolean variable.
Constructor Summary |
CompareAttrBoundValue(BoundValue base)
Creates a CompareAttrBoundValue that will compare the "value" attribute of the node this BoundValue is attached to against the object returned by the base BoundValue. |
CompareAttrBoundValue(BoundValue base, AttributeKey attribute)
Creates a CompareAttrBoundValue that will compare a specified attribute of the node this BoundValue is attached to against the value returned by the base BoundValue. |
CompareAttrBoundValue(BoundValue base, UINode node)
Creates a CompareAttrBoundValue that will compare the "value" attribute of the node to the object returned by the base BoundValue. |
CompareAttrBoundValue(BoundValue base, UINode node, AttributeKey attribute)
Creates a CompareAttrBoundValue that will compare a specified attribute of the node to the value returned by the base BoundValue. |
Method Summary |
java.lang.Object |
getValue(RenderingContext context)
Returns Boolean.TRUE if the BoundValue matches the node attribute, null otherwise. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CompareAttrBoundValue
public CompareAttrBoundValue(BoundValue base)
- Creates a CompareAttrBoundValue that will compare the "value" attribute of the node this BoundValue is attached to against the object returned by the base BoundValue.
CompareAttrBoundValue
public CompareAttrBoundValue(BoundValue base,
UINode node)
- Creates a CompareAttrBoundValue that will compare the "value" attribute of the node to the object returned by the base BoundValue.
CompareAttrBoundValue
public CompareAttrBoundValue(BoundValue base,
AttributeKey attribute)
- Creates a CompareAttrBoundValue that will compare a specified attribute of the node this BoundValue is attached to against the value returned by the base BoundValue.
CompareAttrBoundValue
public CompareAttrBoundValue(BoundValue base,
UINode node,
AttributeKey attribute)
- Creates a CompareAttrBoundValue that will compare a specified attribute of the node to the value returned by the base BoundValue.
getValue
public java.lang.Object getValue(RenderingContext context)
- Returns Boolean.TRUE if the BoundValue matches the node attribute, null otherwise.
-
- Specified by:
getValue
in interface BoundValue
- Following copied from interface:
oracle.cabo.ui.data.BoundValue
-
- Parameters:
context
- the rendering context