generateId()

This method generates an identifier that is unique on this page. It allocates IDs to the HTML Elements created within the ControlWrapper.

Note: If the ID returned by this method is not used by the wrapper, the next time it will return the same ID as it is still unique with in the document. As a convenience, if a suffix is provided as an argument to this method, the returned value will have the suffix appended. If no suffix is provided, then the base identifier will be returned.

A ControlWrapper would want to use this method if it generates any DOM nodes in the HTML that need to be directly referenced using ID. Using this method will ensure that the ID used will not be in conflict with other IDs on the page.

Method Argument:

  • suffix (optional)

Method Return Value:

  • unique ID