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")});