DataStorage dataStorage = this.getApplicationComponent(DataStorage.class);
UIPortal editPortal = null;
UIPortalApplication uiPortalApp = Util.getUIPortalApplication();
UIEditInlineWorkspace uiEditWS = uiPortalApp.<UIWorkingWorkspace> getChildById(UIPortalApplication.UI_WORKING_WS_ID)
.getChild(UIEditInlineWorkspace.class);
if (uiPortalApp.getModeState() != UIPortalApplication.NORMAL_MODE && uiEditWS != null
&& uiEditWS.getUIComponent() != null && (uiEditWS.getUIComponent() instanceof UIPortal)) {
editPortal = (UIPortal) uiEditWS.getUIComponent();
} else {
PortalConfig pConfig = dataStorage.getPortalConfig(getPortalOwner());
editPortal = this.createUIComponent(UIPortal.class, null, null);
PortalDataMapper.toUIPortal(editPortal, pConfig);
}