org.apache.myfaces.trinidadinternal.ui.expl
Class UIFunctions

java.lang.Object
  extended by org.apache.myfaces.trinidadinternal.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 }.

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

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 name)
          Gets the Skin image Icon for the specified namespace/name.
 
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)

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')}


imageIcon

public static java.lang.Object imageIcon(UIImplicitObject uix,
                                         java.lang.String name)
Gets the Skin 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.


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