wt.htmlutil
Class LocalizedTextAction

java.lang.Object
  extended bywt.htmlutil.MethodAction
      extended bywt.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.


Field Summary
private static int BUFFER_START_SIZE
          Deprecated.  
private static boolean TEMPLATE_VERBOSE
          Deprecated.  
private  Hashtable textHash
          Deprecated.  
 
Fields inherited from class wt.htmlutil.MethodAction
argTypes, isStatic, properties, theMethod
 
Constructor Summary
LocalizedTextAction()
          Deprecated. Default constructor.
 
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
 

Field Detail

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. 
Constructor Detail

LocalizedTextAction

public LocalizedTextAction()
Deprecated. 
Default constructor. Same signature as the default constructor for MethodAction.

Method Detail

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 to
context - The object instance to invoke the method on
locale - The locale to use
includeLocale - Whether to include the locale in the method call
Throws:
WTException - to wrap non-I/O-related exceptions
IOException - for I/O exceptions