UIX 2.2.16

oracle.cabo.ui.expl
Class UIFunctions

java.lang.Object
  |
  +--oracle.cabo.ui.expl.UIFunctions

public final class UIFunctions
extends java.lang.Object

Implements some of the EL functions in the { @link UIConstants#MARLIN_NAMESPACE }. In the examples in this javaDoc assume that the prefix 'ui' is bound to { @link UIConstants#MARLIN_NAMESPACE }.


Method Summary
static java.lang.String concat(java.lang.String str1, java.lang.String str2)
          Concatenates two strings.
static java.lang.Object cond(boolean test, java.lang.Object ifTrue, java.lang.Object ifFalse)
          Performs a test.
static java.lang.Object defaulting(java.lang.Object arg1, java.lang.Object arg2)
          Returns arg1 unless it is null, in which case returns arg2.
static java.lang.String encodeParameter(UIImplicitObject uix, java.lang.String parameterName)
          Given the logical name of a parameter, return the parameter key that should be used in the URL.
static java.lang.String hyphenate(UIImplicitObject uix, java.lang.String text, java.lang.String breakChars)
          Inserts the soft hyphen character.
static java.lang.Object imageIcon(UIImplicitObject uix, java.lang.String namespace, java.lang.String name)
          Gets the LookAndFeel image Icon for the specified namespace/name.
static int tableSelectedIndex(UIImplicitObject uix, java.lang.String tableName)
          Gets the selected index from a singleSelection table.
static int[] tableSelection(UIImplicitObject uix, java.lang.String tableName)
          Gets the selected indices from a multipleSelection table.
static java.lang.String transformId(UIImplicitObject uix, java.lang.String text)
          Returns a transformed version of text; used most commonly for transforming IDs within a table.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

encodeParameter

public static java.lang.String encodeParameter(UIImplicitObject uix,
                                               java.lang.String parameterName)
Given the logical name of a parameter, return the parameter key that should be used in the URL. This function should not be used for parameter values. Example:
 <formValue name="${ui:encodeParameter(uix,'event')}"
            value="viewSource"/>
 
See Also:
URLEncoder.encodeParameter(java.lang.String)

transformId

public static java.lang.String transformId(UIImplicitObject uix,
                                           java.lang.String text)
Returns a transformed version of text; used most commonly for transforming IDs within a table. Example:
id="${ui:transformId(uix, 'anId')}"
Parameters:
uix - the current set of implicit objects
text - the ID to transform.

defaulting

public static java.lang.Object defaulting(java.lang.Object arg1,
                                          java.lang.Object arg2)
Returns arg1 unless it is null, in which case returns arg2. Example:
 ${ui:defaulting(null,'The default')}

cond

public static java.lang.Object cond(boolean test,
                                    java.lang.Object ifTrue,
                                    java.lang.Object ifFalse)
Performs a test.
Parameters:
test - the condition to test
ifTrue - the object to return if the test is true
ifFalse - the object to return if the test is false
Returns:
ifTrue if test is true. IfFalse otherwise. Example:
 ${ui:cond(blockSize > 100, 'Too Many Records', 'Detailed List')}

hyphenate

public static java.lang.String hyphenate(UIImplicitObject uix,
                                         java.lang.String text,
                                         java.lang.String breakChars)
Inserts the soft hyphen character. The following example inserts a soft hyphen after each '/' character in the directory string:
 ${ui:hyphenate(uix, '/src/oracle/cabo/ui/laf/oracle/desktop/table','/')}
Parameters:
text - the soft hyphen character, &shy; , is inserted into this string.
breakChars - &shy; is inserted after each occurence of any of the characters in this string.

concat

public static java.lang.String concat(java.lang.String str1,
                                      java.lang.String str2)
Concatenates two strings. Example:
 ${ui:concat('Julius','Caesar')}

tableSelectedIndex

public static int tableSelectedIndex(UIImplicitObject uix,
                                     java.lang.String tableName)
                              throws ExplException
Gets the selected index from a singleSelection table. Example:
 <set target="${sessionScope}" property="selectedIndex"
  value="${ui:tableSelectedIndex(uix, 'CustomerView')}" />
Parameters:
tableName - the name of the table to get the selected index from.

tableSelection

public static int[] tableSelection(UIImplicitObject uix,
                                   java.lang.String tableName)
                            throws ExplException
Gets the selected indices from a multipleSelection table. Example:
 <set target="${sessionScope}" property="selection"
  value="${ui:tableSelection(uix, 'CustomerView')}" />
Parameters:
tableName - the name of the table to get the selected index from.

imageIcon

public static java.lang.Object imageIcon(UIImplicitObject uix,
                                         java.lang.String namespace,
                                         java.lang.String name)
Gets the LookAndFeel image Icon for the specified namespace/name.

The object that is returned returned provides access to three values:

Parameters:
uix - The UIX implicit object
namespace - The namespace of the Image to retrieve
name - The name of the icon to retrieve.

UIX 2.2.16