org.apache.myfaces.trinidadinternal.ui.data.bind
Class DefaultingBoundValue

java.lang.Object
  extended by org.apache.myfaces.trinidadinternal.ui.data.bind.DefaultingBoundValue
All Implemented Interfaces:
BoundValue

public class DefaultingBoundValue
extends java.lang.Object
implements BoundValue

A BoundValue implementation that wraps another and returns a provided default value in place of null.

Version:
$Name: $ ($Revision: adfrt/faces/adf-faces-impl/src/main/java/oracle/adfinternal/view/faces/ui/data/bind/DefaultingBoundValue.java#0 $) $Date: 10-nov-2005.18:56:38 $
Author:
The Oracle ADF Faces Team

Constructor Summary
DefaultingBoundValue(BoundValue wrapped, BoundValue defaultBoundValue)
          Creates a DefaultingBoundValue.
DefaultingBoundValue(BoundValue wrapped, java.lang.Object defaultValue)
          Creates a DefaultingBoundValue.
 
Method Summary
 java.lang.Object getValue(UIXRenderingContext context)
          Called to retrieve a value based on the current rendering context.
protected  java.lang.Object getWrappedValue(UIXRenderingContext context)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultingBoundValue

public DefaultingBoundValue(BoundValue wrapped,
                            java.lang.Object defaultValue)
Creates a DefaultingBoundValue.

Parameters:
wrapped - the BoundValue to try first
defaultValue - the value to return if wrapped returns null

DefaultingBoundValue

public DefaultingBoundValue(BoundValue wrapped,
                            BoundValue defaultBoundValue)
Creates a DefaultingBoundValue.

Parameters:
wrapped - the BoundValue to try first
defaultBoundValue - the BoundValue to use if wrapped returns null
Method Detail

getValue

public java.lang.Object getValue(UIXRenderingContext context)
Description copied from interface: BoundValue
Called to retrieve a value based on the current rendering context.

Specified by:
getValue in interface BoundValue
Parameters:
context - the rendering context

getWrappedValue

protected java.lang.Object getWrappedValue(UIXRenderingContext context)


Copyright © 2001-2007 Apache Software Foundation. All Rights Reserved.