new ApplicationMessage("UIPortalManagement.msg.Invalid-EditPage-Permission", null));
return;
}
UIPortalApplication uiApp = Util.getUIPortalApplication();
UIWorkingWorkspace uiWorkingWS = uiApp.getChildById(UIPortalApplication.UI_WORKING_WS_ID);
uiWorkingWS.setRenderedChild(UIEditInlineWorkspace.class);
UIPortalComposer portalComposer = uiWorkingWS.findFirstComponentOfType(UIPortalComposer.class).setRendered(true);
portalComposer.setComponentConfig(UIPortalComposer.class, "UIPageEditor");
portalComposer.setId("UIPageEditor");
portalComposer.setShowControl(true);
portalComposer.setEditted(false);
portalComposer.setCollapse(false);
UIPortalToolPanel uiToolPanel = uiWorkingWS.findFirstComponentOfType(UIPortalToolPanel.class);
uiToolPanel.setShowMaskLayer(false);
uiApp.setModeState(UIPortalApplication.APP_BLOCK_EDIT_MODE);
// We clone the edited UIPage object, that is required for Abort action
UIPage newUIPage = uiWorkingWS.createUIComponent(UIPage.class, null, null);
PortalDataMapper.toUIPage(newUIPage, page);
uiToolPanel.setWorkingComponent(newUIPage);
// Remove current UIPage from UIPageBody
UIPageBody pageBody = uiWorkingWS.findFirstComponentOfType(UIPageBody.class);
pageBody.setUIComponent(null);
PortalRequestContext prContext = Util.getPortalRequestContext();
prContext.addUIComponentToUpdateByAjax(uiWorkingWS);
prContext.setFullRender(true);