public class TextProviderHelper extends Object
Constructor and Description |
---|
TextProviderHelper() |
Modifier and Type | Method and Description |
---|---|
static String |
getText(String key,
String defaultMessage,
List<Object> args,
ValueStack stack)
Get a message from the first TextProvider encountered in the stack.
|
static String |
getText(String key,
String defaultMessage,
List<Object> args,
ValueStack stack,
boolean searchStack)
Deprecated.
The stack should never be searched for the key. Use the version without the searchStack boolean instead.
|
static String |
getText(String key,
String defaultMessage,
ValueStack stack)
Get a message from the first TextProvider encountered in the stack.
|
public static String getText(String key, String defaultMessage, List<Object> args, ValueStack stack)
Get a message from the first TextProvider encountered in the stack. If the first TextProvider doesn't provide the message the default message is returned.
The stack is searched if if no TextProvider is found, or the message is not found.key
- the message key in the resource bundledefaultMessage
- the message to return if not found (evaluated for OGNL)args
- an array args to be used in a MessageFormat
messagestack
- the value stack to use for finding the text@Deprecated public static String getText(String key, String defaultMessage, List<Object> args, ValueStack stack, boolean searchStack)
Get a message from the first TextProvider encountered in the stack. If the first TextProvider doesn't provide the message the default message is returned.
The search for a TextProvider is iterative from the root of the stack.
This method was refactored from Text
to use a
consistent implementation across UIBean components.
key
- the message key in the resource bundledefaultMessage
- the message to return if not found (evaluated for OGNL)args
- an array args to be used in a MessageFormat
messagestack
- the value stack to use for finding the textsearchStack
- search stack for the keypublic static String getText(String key, String defaultMessage, ValueStack stack)
Get a message from the first TextProvider encountered in the stack. If the first TextProvider doesn't provide the message the default message is returned.
The search for a TextProvider is iterative from the root of the stack.
This method was refactored from Text
to use a
consistent implementation across UIBean components.
key
- the message key in the resource bundledefaultMessage
- the message to return if not foundstack
- the value stack to use for finding the textCopyright © 2000–2020 Apache Software Foundation. All rights reserved.