om.DomDocument.getElementById
Returns a node element ID based on the internal AUI tree id.
Syntax
getDocumentById(
id INTEGER )
RETURNS om.DomNode
Usage
The method getElementById()
returns the om.DomNode
element of
the DOM document based on the internal id number passed as parameter.
Each DOM node gets an internal integer id when it is created in the abstract user interface tree. It can be referenced by this unique id. The node id is typically used in other nodes, to reference a node in the DOM document.
To hold the reference to the root node, define a variable with the om.DomNode
type.
Example
MAIN
DEFINE uid om.DomDocument
DEFINE n om.DomNode
LET uid = ui.Interface.getDocument()
MENU "test"
COMMAND "Get UI node by ID"
LET n = uid.getElementById(1)
IF n IS NOT NULL THEN
DISPLAY n.toString()
END IF
COMMAND "Exit"
EXIT MENU
END MENU
END MAIN