uiComposer.setCollapse(false);
uiComposer.setShowControl(true);
uiComposer.setComponentConfig(UIPortalComposer.class, null);
uiComposer.setId("UIPortalComposer");
UIPortal uiPortal = Util.getUIPortal();
uiWorkingWS.setBackupUIPortal(uiPortal);
UIPortal editPortal = uiWorkingWS.createUIComponent(UIPortal.class, null, null);
PortalDataMapper.toUIPortal(editPortal, userConfig);
uiEditWS.setUIComponent(editPortal);
// Check if edit current portal
if (uiPortal.getName().equals(editPortal.getName()))
{
editPortal.setSelectedNode(uiPortal.getSelectedNode());
editPortal.setSelectedNavigation(uiPortal.getSelectedNavigation());
editPortal.setSelectedPath(uiPortal.getSelectedPath());
UISiteBody siteBody = uiWorkingWS.findFirstComponentOfType(UISiteBody.class);
siteBody.setUIComponent(null);
}
editPortal.refreshUIPage();
portalApp.setModeState(UIPortalApplication.APP_BLOCK_EDIT_MODE);
uiWorkingWS.setRenderedChild(UIPortalApplication.UI_EDITTING_WS_ID);
prContext.addUIComponentToUpdateByAjax(uiWorkingWS);
prContext.setFullRender(true);