Oracle UIX API Reference
Release 2.1.22.0.0
B12196-01

oracle.cabo.ui.xml.parse
Class BoundValueUtils

java.lang.Object
  |
  +--oracle.cabo.ui.xml.parse.BoundValueUtils

public class BoundValueUtils
extends java.lang.Object

Utility functions for BoundValues.


Method Summary
static BoundValue convertBoundValue(BoundValue base, java.lang.Class convertTo)
          Given a BoundValue, wraps it if needed to ensure the return type will be correct.
static BoundValue createBoundValue(ParseContext context, org.xml.sax.Attributes attrs)
          Creates a BoundValue off of SAX attributes.
static BoundValue createBoundValue(ParseContext context, java.lang.String valueText, java.lang.Object defaultValue)
          Creates a DataObject BoundValue off a string.
static java.lang.Object getAttributeWithDataBindings(ParseContext context, org.xml.sax.Attributes attrs, java.lang.String name)
          Creates either a static object or BoundValue off of SAX attributes.
static java.lang.String getDataBoundAttribute(org.xml.sax.Attributes attrs, java.lang.String localName)
          gets a databound attribute with the specified name.
static boolean isDataBoundAttribute(java.lang.String namespaceURI)
          Returns true if an attribute namespace is one for data binding.
static void warnOfUnsupportedDataBoundAttribute(ParseContext context, org.xml.sax.Attributes attrs, java.lang.String localName)
          Check if an attribute is databound; if it is, warn the user that databinding isn't supported.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

isDataBoundAttribute

public static boolean isDataBoundAttribute(java.lang.String namespaceURI)
Returns true if an attribute namespace is one for data binding.

warnOfUnsupportedDataBoundAttribute

public static void warnOfUnsupportedDataBoundAttribute(ParseContext context,
                                                       org.xml.sax.Attributes attrs,
                                                       java.lang.String localName)
Check if an attribute is databound; if it is, warn the user that databinding isn't supported.

getDataBoundAttribute

public static java.lang.String getDataBoundAttribute(org.xml.sax.Attributes attrs,
                                                     java.lang.String localName)
gets a databound attribute with the specified name. A databound attribute is one which is in the UIX Components (Marlin) namespace. This method supports both the old and the new Marlin namespaces.
Parameters:
attrs - the attributes to search
localName - the attribute name to search for. This must not be an XML qualified name; it must be the element name without a prefix.
Returns:
the value of a databound attribute with the name localName, or null if none exists.
See Also:
UIConstants.MARLIN_NAMESPACE

createBoundValue

public static BoundValue createBoundValue(ParseContext context,
                                          java.lang.String valueText,
                                          java.lang.Object defaultValue)
Creates a DataObject BoundValue off a string. The accepted syntax is {selectText} for binding to the current data object, and {selectText}@{namespace}:{localName} for binding to named data objects. Use parens to recurse. eg: (key1@namespace:localName)@(key2@name2). The following is also supported: key3@key2@key1@namespace:name. (The namespace and local name cannot include an "@")

Parameters:
context - the parsing context
valueText - the string representation
defaultValue - the default value. This is the value to return if the BoundValue returned by valueText returns null.

getAttributeWithDataBindings

public static java.lang.Object getAttributeWithDataBindings(ParseContext context,
                                                            org.xml.sax.Attributes attrs,
                                                            java.lang.String name)
Creates either a static object or BoundValue off of SAX attributes.

createBoundValue

public static BoundValue createBoundValue(ParseContext context,
                                          org.xml.sax.Attributes attrs)
Creates a BoundValue off of SAX attributes.
Parameters:
context - the parsing context
attrs - attributes from the current XML element. The attribute names considered are select, source and default. Both the source and select attributes may be data bound.

convertBoundValue

public static BoundValue convertBoundValue(BoundValue base,
                                           java.lang.Class convertTo)
Given a BoundValue, wraps it if needed to ensure the return type will be correct.
Parameters:
base - the original BoundValue
convertTo - the desired Java class
Returns:
a BoundValue, possibly the same one passed in

Oracle UIX API Reference
Release 2.1.22.0.0
B12196-01

Copyright © 2002,2003, Oracle. All Rights Reserved.