com.ibm.hats.transform.html
Class HTMLUniqueIDManager
java.lang.Object
com.ibm.hats.transform.html.HTMLUniqueIDManager
public class HTMLUniqueIDManager
- extends Object
This class is intended to be a request-scoped manager of Unique IDs for HTML elements.
In particular, it is used to keep the IDs for LABEL elements unique within a particular
HTML document.
- Since:
- 6.0.8
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CLASSNAME
public static final String CLASSNAME
FORM_ELEM_ID
public static final String FORM_ELEM_ID
- See Also:
- Constant Field Values
HTMLUniqueIDManager
public HTMLUniqueIDManager()
createUniqueFormID
public final String createUniqueFormID(String form,
String name)
- This synchronized method will return a form ID unlike any it has returned before.
It will first try to return just the concatenation of the given form and name arguments.
If that is not unique, it will try appending "id" plus an integer to the concatenation.
For example, createUniqueFormID("HATSForm", "in_30_5") returns "HATSFormin_30_5"
the first time it is called with those arguments.
The second time it will return "HATSFormin_30_5id1".
- Parameters:
form - the name of the formname - usually an element name
- Returns:
- String containing the calculated unique identifier.