Portal, Express Beta Version 6.1
Operating systems: i5/OS, Linux,Windows |
To put a portlet on a page, use the insert() method of the controller.
To place a portlet on a page, proceed by the following steps:
// obtain layout model controller final LayoutModelController lmController = cmController.getLayoutModelController(page); // obtain layout control creation context final LayoutControlCreationContext context = ... (portletDefinition, null); //final LayoutControlCreationContext context = ... (portletDefinition, portletEntity); // create layout control final Modifiable control = lmController.create(LayoutControl.class, context); // insert control into the topology of the layout model controller (given a container and a sibling) lmController.insert(control, container, sibling); // commit the content model controller cmController.commit();Parent topic: Moving or Inserting Nodes