HATS 7.5.1 Web API Reference

Publicly accessible methods not documented here are for IBM internal use only and may change in a future release of the product.

com.ibm.hats.transform.html
Class HTMLUniqueIDManager

java.lang.Object
  extended by 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

Field Summary
static String CLASSNAME
           
static String FORM_ELEM_ID
           
 
Constructor Summary
HTMLUniqueIDManager()
           
 
Method Summary
 String createUniqueFormID(String form, String name)
          This synchronized method will return a form ID unlike any it has returned before.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASSNAME

public static final String CLASSNAME

FORM_ELEM_ID

public static final String FORM_ELEM_ID
See Also:
Constant Field Values
Constructor Detail

HTMLUniqueIDManager

public HTMLUniqueIDManager()
Method Detail

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 form
name - usually an element name
Returns:
String containing the calculated unique identifier.

HATS 7.5.1 (201005110649)