Components

The Components interface provides a means of switching between component contexts.

Each component context provides access to the elements of that Component - fields, tables, pages, resources, sub-components etc. Therefore switching component context allows one deployed component (or a form) access to component elements from another deployed component.

Individual component contexts are accessed using the component prefix of a deployed component. When the component prefix is not a valid Java identifier e.g. it begins with a numeric, the component context can only be accessed using the #getComponent(String) method.

At form level, only those components that have been inserted into the form are visible. Any nested sub-components can be accessed by using the components variable of each component e.g. components.PREFIX1.components.SUB1.

The form level context is a special case that is accessed using a component context of Form.

Examples:

 components.PREFIX1.tables.ORDERS.fetchTable();
 components.getComponent("PREFIX1").tables.ORDERS.fetchTable();
 components.PREFIX2.fields.CONFIRM_ORDER.value = true;
 components.PREFIX1.components.NESTED2.resources.WS1.call();
 components.Form.resources.EM1.sendmail();
 

Components Functions

getComponent Components.getComponent( componentPrefix ) Returns the Component object for the deployed component with prefix componentPrefix.