Oracle Fusion Middleware extensions for Applications Core API Reference
11g Release 1 (11.1.1.6)

E22562-03

oracle.apps.fnd.applcore.flex.ui.common
Class JSFUtils

java.lang.Object
  extended by oracle.apps.fnd.applcore.flex.ui.common.JSFUtils

public class JSFUtils
extends java.lang.Object

General useful static utilies for working with JSF. NOTE: Updated to use JSF 1.2 ExpressionFactory.

Author:
Duncan Mills, Steve Muench $Id: JSFUtils.java /main/7 2010/11/30 23:43:22 abhaykum Exp $

Constructor Summary
JSFUtils()
           
 
Method Summary
static void displayConfirmationMessage(java.lang.String confirmHeader, java.lang.String confirmText)
          Display the confirmation message for given message header and text string.
static void displayErrorMessage(java.lang.String message)
          Method to display error message
static void displayWarningMessage(java.lang.String message)
          Method to display warning message
static java.lang.Object evaluateEL(java.lang.String el)
           
static java.lang.Object evaluateExpr(java.lang.String pExpr, java.lang.Class pClass)
          Evalutates the given expression
static javax.faces.context.FacesContext getFacesContext()
          Get FacesContext.
static java.lang.String getFlexAdminMLSString(java.lang.String msgKey)
          Gets Translated message for given key.
static java.lang.String getFlexAdminMLSString(java.lang.String msgKey, java.lang.Object... pTokens)
          Gets Translated message for given key and token.
static java.lang.String getTranslatedLabel(java.lang.String pRbName, java.lang.String pRbKey, java.lang.Object... pTokens)
          Returns the translated String from the given resource bundle with the given key and token values.
static java.lang.Object invokeEL(java.lang.String el)
          Programmatic invocation of a method that an EL evaluates to.
static java.lang.Object invokeEL(java.lang.String el, java.lang.Class[] paramTypes, java.lang.Object[] params)
          Programmatic invocation of a method that an EL evaluates to.
static java.lang.Object resolveExpression(java.lang.String expression)
          Method for taking a reference to a JSF binding expression and returning the matching object (or creating it).
static void setEL(java.lang.String el, java.lang.Object val)
          Sets a value into an EL object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JSFUtils

public JSFUtils()
Method Detail

evaluateEL

public static java.lang.Object evaluateEL(java.lang.String el)

invokeEL

public static java.lang.Object invokeEL(java.lang.String el)
Programmatic invocation of a method that an EL evaluates to. The method must not take any parameters.

Parameters:
el - EL of the method to invoke
Returns:
Object that the method returns

invokeEL

public static java.lang.Object invokeEL(java.lang.String el,
                                        java.lang.Class[] paramTypes,
                                        java.lang.Object[] params)
Programmatic invocation of a method that an EL evaluates to.

Parameters:
el - EL of the method to invoke
paramTypes - Array of Class defining the types of the parameters
params - Array of Object defining the values of the parameters
Returns:
Object that the method returns

setEL

public static void setEL(java.lang.String el,
                         java.lang.Object val)
Sets a value into an EL object. Provides similar functionality to the <af:setActionListener> tag, except the from is not an EL. You can get similar behavior by using the following...
setEL(to, evaluateEL(from))

Parameters:
el - EL object to assign a value
val - Value to assign

resolveExpression

public static java.lang.Object resolveExpression(java.lang.String expression)
Method for taking a reference to a JSF binding expression and returning the matching object (or creating it).

Parameters:
expression - EL expression
Returns:
Managed object

evaluateExpr

public static java.lang.Object evaluateExpr(java.lang.String pExpr,
                                            java.lang.Class pClass)
Evalutates the given expression


getTranslatedLabel

public static java.lang.String getTranslatedLabel(java.lang.String pRbName,
                                                  java.lang.String pRbKey,
                                                  java.lang.Object... pTokens)
Returns the translated String from the given resource bundle with the given key and token values.

Parameters:
pRbName - fully qualified name of the resource bundle. This could be a XLIFF resource bundle or a Java resource bundle.
pRbKey - key for the resource in the bundle
pTokens - any tokens for the resource that need to be substituted.
Returns:
the translated String value from the resource bundle with the given key and token values.

getFlexAdminMLSString

public static java.lang.String getFlexAdminMLSString(java.lang.String msgKey)
Gets Translated message for given key.

Parameters:
msgKey -
Returns:
translated message string

getFlexAdminMLSString

public static java.lang.String getFlexAdminMLSString(java.lang.String msgKey,
                                                     java.lang.Object... pTokens)
Gets Translated message for given key and token.

Parameters:
msgKey -
pTokens -
Returns:
translated message string

displayErrorMessage

public static void displayErrorMessage(java.lang.String message)
Method to display error message

Parameters:
message -

displayWarningMessage

public static void displayWarningMessage(java.lang.String message)
Method to display warning message

Parameters:
message -

displayConfirmationMessage

public static void displayConfirmationMessage(java.lang.String confirmHeader,
                                              java.lang.String confirmText)
Display the confirmation message for given message header and text string.

Parameters:
confirmHeader - Confirmation Header message to be displayed
confirmText - Confirmation Text Message to be displayed

getFacesContext

public static javax.faces.context.FacesContext getFacesContext()
Get FacesContext.

Returns:
FacesContext

Oracle Fusion Middleware extensions for Applications Core API Reference
11g Release 1 (11.1.1.6)

E22562-03

Copyright © 2012 Oracle. All Rights Reserved.