wt.htmlutil
Class LocalizedTextAction
java.lang.Object
wt.htmlutil.MethodAction
wt.htmlutil.LocalizedTextAction
- All Implemented Interfaces:
- TemplateAction
- public class LocalizedTextAction
- extends MethodAction
LocalizedTextAction provides a TemplateAction for delivering localized
static text to a page without repeatedly performing resource lookups.
It can be generalized as a MethodAction that caches (presumably) static
results based on locale. It inherits from MethodAction to allow any
method to have its results cached in this way. The class name is to
demonstrate that it essentially just delivers localized text (generated
by a particular method), and cached by locale - and not to imply some
link to TextAction.
Method Summary |
void |
action(OutputStream out,
Object context,
Locale locale,
boolean includeLocale)
Deprecated. The action method uses the stored method to generate text for a given
locale, if none has been generated already. |
Methods inherited from class wt.htmlutil.MethodAction |
getMethod, getParameterCount, getParameters, getProperty, getRecursiveProperty, putProperty, putRecursiveProperty, setMethod, setParameterCount, setParameters, setProperty |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TEMPLATE_VERBOSE
private static final boolean TEMPLATE_VERBOSE
- Deprecated.
BUFFER_START_SIZE
private static final int BUFFER_START_SIZE
- Deprecated.
textHash
private Hashtable textHash
- Deprecated.
LocalizedTextAction
public LocalizedTextAction()
- Deprecated.
- Default constructor.
Same signature as the default constructor for MethodAction.
action
public void action(OutputStream out,
Object context,
Locale locale,
boolean includeLocale)
throws WTException,
IOException
- Deprecated.
- The action method uses the stored method to generate text for a given
locale, if none has been generated already. It caches that text based
on locale for future lookups.
- Specified by:
action
in interface TemplateAction
- Overrides:
action
in class MethodAction
- Parameters:
out
- The stream to output text tocontext
- The object instance to invoke the method onlocale
- The locale to useincludeLocale
- Whether to include the locale in the method call
- Throws:
WTException
- to wrap non-I/O-related exceptions
IOException
- for I/O exceptions