ui.Window.findNode

Search for a specific element in the window.

Syntax

findNode(
   type STRING,
   name STRING )
  RETURNS om.DomNode
  1. type defines the type of the node.
  2. name defines the name of the node.

Usage

The findNode() method allows you to search for a specific DOM node in the abstract representation of the window. You search for a child node by giving its type and the name of the element (i.e. the tagname and the value of the 'name' attribute).

The method returns the first element found matching the specified type (tagname) and node name. Window element names must be unique for the same type of nodes, if you want to distinguish all elements.

The findNode() method is provided for ui.Window class for specific cases when the window does not contain a form. For windows containing a form, use the ui.Form.findNode() method instead.

Example

DEFINE w ui.Window, n om.DomNode
OPEN WINDOW w1 WITH FORM "custform"
LET w = ui.Window.getCurrent()
LET n = w.findNode("FormField","customer.cust_name")
...