org.apache.myfaces.trinidadinternal.ui.data
Class DataBoundValue

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

public class DataBoundValue
extends java.lang.Object
implements BoundValue

DataBoundValue implements BoundValue to retrieve a DataObject from the current rendering context, and perform a select on that object.

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

Constructor Summary
DataBoundValue(java.lang.Object select)
          Creates a BoundValue bound to the context's "current data object".
DataBoundValue(java.lang.String namespaceURI, java.lang.String localName, java.lang.Object select)
          Creates a BoundValue bound to a named data object on the context.
 
Method Summary
 java.lang.String getLocalName()
          Returns the local name.
 java.lang.String getNamespaceURI()
          Returns the namespace.
 java.lang.Object getSelect()
          Returns the select key.
 java.lang.Object getValue(UIXRenderingContext context)
          Called to retrieve a value based on the current rendering context.
static void handleException(UIXRenderingContext context, java.lang.RuntimeException exception)
          Handles a RuntimeException; the exception is swallowed after being logged.
static void handleException(UIXRenderingContext context, java.lang.Throwable throwable)
          Handles a Throwable; the exception is swallowed after being logged.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataBoundValue

public DataBoundValue(java.lang.Object select)
Creates a BoundValue bound to the context's "current data object". This will return the equivalent of the following code:
   return context.getCurrentDataObject().selectValue(context, select);
 

Parameters:
select - the select string

DataBoundValue

public DataBoundValue(java.lang.String namespaceURI,
                      java.lang.String localName,
                      java.lang.Object select)
Creates a BoundValue bound to a named data object on the context. This will return the equivalent of the following code:
   return context.getDataObject(namespaceURI, localName).
                                   selectValue(context, select);
 
If the select string is null, DataBoundValue will directly return the named data object:
   return context.getDataObject(namespaceURI, localName);
 

Parameters:
namespaceURI - the namespace of the DataObject to use
localName - the name of the DataObject to use
select - the select string
Method Detail

getValue

public java.lang.Object getValue(UIXRenderingContext context)
Called to retrieve a value based on the current rendering context.

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

getSelect

public java.lang.Object getSelect()
Returns the select key.


getLocalName

public java.lang.String getLocalName()
Returns the local name.


getNamespaceURI

public java.lang.String getNamespaceURI()
Returns the namespace.


handleException

public static void handleException(UIXRenderingContext context,
                                   java.lang.Throwable throwable)
Handles a Throwable; the exception is swallowed after being logged.


handleException

public static void handleException(UIXRenderingContext context,
                                   java.lang.RuntimeException exception)
Handles a RuntimeException; the exception is swallowed after being logged.



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