Configuring Siebel Open UI > Siebel Open UI Application Programming Interface > Methods of the Siebel Open UI Application Programming Interface >

Component Manager Class


This topic describes the methods that Siebel Open UI uses with the Component Manager class. It includes the following information:

The Component Manager class manages components in Siebel Open UI. It can create or delete components and it allows you to configure Siebel Open UI to search for a component according to criteria that you specify.

DeleteComponent Method

The DeleteComponent method deletes a component from the component tree. It uses the following syntax:

DeleteComponent(cmpObj)

where:

  • cmpObj references a component object.

For example, the following code deletes the component that cmpObj references:

SiebelAppFacade.ComponentMgr.DeleteComponent(cmpObj);

FindComponent Method

The FindComponent method identifies a component according to the criteria that a function specifies. It returns an array that includes component names. If it cannot identify any components, then it returns nothing. It uses the following syntax:

FindComponent({id : "custom_dependency_object"});

Finding Components According to IDs

Siebel Open UI maps the Id of the component to the name of this component. It does the same mapping when it uses the MakeComponent method to create a dependency. You can use the following code to find a component according to the component Id:

var cmpObj = SiebelAppFacade.ComponentMgr.FindComponent({id : "custom_dependency_object"});

Getting Parents, Siblings, and Children

If you provide a component and a relation, then the FindComponent method gets a list of components according to the component and relation that you specify. You use the following code:

var cmprelationship = SiebelAppFacade.ComponentMgr.FindComponent({cmp: cmpObj, rel : consts.get("values")});

where:

  • relationship specifies a parent, sibling, or child relationship.
  • cmp is an abbreviation for component. cmpObj identifies the component.
  • rel is an abbreviation for relation. It identifies the type of relationship.
  • values specifies the values to get. To get a list of:
    • Parents, you use SWE_CMP_REL_SIBLING
    • Siblings, you use SWE_CMP_REL_SIBLING
    • Children, you use SWE_CMP_REL_CHILDREN

For example, the following code gets a list of parents:

var cmpParent = SiebelAppFacade.ComponentMgr.FindComponent({cmp: cmpObj, rel : consts.get("SWE_CMP_REL_PARENT")});

MakeComponent Method

The MakeComponent method creates a component. It returns nothing. It uses the following syntax:

SiebelAppFacade.ComponentMgr.MakeComponent(parent,psInfo, dependency);

where:

  • parent identifies the parent of the component that Siebel Open UI creates. For example, a view, applet, and so on.
  • psInfo contains property set information that identifies the name of the module that Siebel Open UI uses for the presentation model and the physical renderer. Siebel Open UI uses this property set information to create the presentation model. It also passes this property set to the setup method that it uses to set up the presentation model.
  • dependency identifies an object that Siebel Open UI uses as a template to create the presentation model. If the presentation model must reference an applet or view, then this dependency must also reference this same applet or view. To specify the dependency for a local component, you must use an object that references the GetName method.

The MakeComponent method does the following work:

  • Creates a component.
  • Attaches this component to the component tree. It attaches this component at the tree level that Siebel Open UI uses for user interface objects.
  • Calls the Setup method that Siebel Open UI uses to create the new component. This Setup method uses information that the psInfo argument of the MakeComponent method specifies. It uses this information to create the presentation model. For more information, see Setup Method for Components.
  • Calls the Setup method that Siebel Open UI uses for the presentation model. This method binds all objects that are involved in the life cycle that Siebel Open UI runs for the component. For more information, see Setup Method for Presentation Models.

For an example that uses the MakeComponent method, see Creating Components.

Show Method for Component Managers

The Show method that Siebel Open UI uses for component managers displays components. It uses the following syntax:

Show()

It includes no arguments.

The Show method that Siebel Open UI uses for component managers calls a show on the component object. This component object then calls a Show method on the physical renderer that the component references.

You can use the Show method to configure Siebel Open UI to display all components that reside in the tree that contains the component. If you must configure Siebel Open UI to display only one component, then is recommended that you use the Show method on each individual component.

For information about the Show method that Siebel Open UI uses for components, see Show Method for Components.

Configuring Siebel Open UI Copyright © 2015, Oracle and/or its affiliates. All rights reserved. Legal Notices.