Interface Components

All Superinterfaces:
java.lang.Iterable<Component>

public interface Components
extends java.lang.Iterable<Component>
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();
 
Since:
V4.4
  • Method Summary

    Modifier and Type Method Description
    Component getComponent​(java.lang.String componentPrefix)
    Returns the Component object for the deployed component with prefix componentPrefix.

    Methods inherited from interface java.lang.Iterable

    forEach, iterator, spliterator
  • Method Details

    • getComponent

      Component getComponent​(java.lang.String componentPrefix)
      Returns the Component object for the deployed component with prefix componentPrefix. The returned Component object gives access to all form elements within the component. When componentPrefix is Form, returns a Component object that corresponds to the form i.e. gives access to all form elements.

      Javascript example:

       var comp = components.getComponent("PREFIX1");
       comp.tables.ORDERS.fetchTable();
       form.gotoPage(components.getComponent("Form").pages.PAGE5);
       
      Returns:
      Component
      Since:
      V4.4