Often in ATG form handler or droplet code one finds code like this:
public static final String OUTPUT = "output";
You can take advantage of ATG’s ParameterName class to represent any parameter name. From the ATG 2006.3 API Reference:
A ParameterName object can represent any parameter name used in Dynamo. Use this class when building your own droplets to create unique parameter names. The parameter names will then be stored in a global hashtable keyed by strings. Using this class allows the parameters of a droplet to be publicly available as well as enforcing good coding standards whereby the parameter name string only appears once in the java code.
Throughout ATG’s public source you can see that many parameter names have already been defined. For brevity sake I have omitted the “public final static” prefix.
ParameterName ARRAY = ParameterName.getParameterName("array"); ParameterName DEBUG = ParameterName.getParameterName("debug"); ParameterName DEFAULT = ParameterName.getParameterName("default"); ParameterName ELEMENT_NAME = ParameterName.getParameterName("elementName"); ParameterName EMPTY = ParameterName.getParameterName("empty"); ParameterName EQUAL = ParameterName.getParameterName("equal"); ParameterName GREATERTHAN = ParameterName.getParameterName("greaterthan"); ParameterName INDEX_NAME = ParameterName.getParameterName("indexName"); ParameterName IN_URL = ParameterName.getParameterName("inUrl"); ParameterName LESSTHAN = ParameterName.getParameterName("lessthan"); ParameterName NONCOMPARABLE = ParameterName.getParameterName("noncomparable"); ParameterName NON_SECURE_URL = ParameterName.getParameterName("nonSecureUrl"); ParameterName OBJ1 = ParameterName.getParameterName("obj1"); ParameterName OBJ2 = ParameterName.getParameterName("obj2"); ParameterName OUTPUT = ParameterName.getParameterName("output"); ParameterName OUTPUT_END = ParameterName.getParameterName("outputEnd"); ParameterName OUTPUT_START = ParameterName.getParameterName("outputStart"); ParameterName PATH = ParameterName.getParameterName("path"); ParameterName REVERSE_ORDER = ParameterName.getParameterName("reverseOrder"); ParameterName SECURE_URL = ParameterName.getParameterName("secureUrl"); ParameterName SORT_PROPERTIES = ParameterName.getParameterName("sortProperties"); ParameterName TRUE = ParameterName.getParameterName("true"); ParameterName UNSET = ParameterName.getParameterName("unset"); ParameterName VALUE = ParameterName.getParameterName("value"); ParameterName CURRENCY_PARAM = ParameterName.getParameterName("currency"); ParameterName EURO_SYMBOL_PARAM = ParameterName.getParameterName("euroSymbol"); ParameterName LOCALE_PARAM = ParameterName.getParameterName("locale"); ParameterName TARGET_LOCALE_PARAM = ParameterName.getParameterName("targetLocale"); ParameterName YEN_SYMBOL_PARAM = ParameterName.getParameterName("yenSymbol");