Creating
and Adding Nodes
To add a component node, do the following:
...
1. Create a portal component context for the component.
IPortalComponentContext portalContext =
request.getComponentContext("myApp.myComp");
2. Create a component node.
IComponentNode componentNode = request.getNode().getPortalNode()
.createComponentNode("myNode",portalContext);
3. Add the node to the POM tree. For example, the following adds a node to the portal node:
request.getNode().getPortalNode().addChildNode(componentNode);
To remove a child node, a node can call removeChildNode()and supply a reference to the node to be removed.