public static class EditPortalPropertiesActionListener extends EventListener<UIPortal> {
public void execute(Event<UIPortal> event) throws Exception {
String portalName = event.getRequestContext().getRequestParameter("portalName");
UIPortal uiPortal = Util.getUIPortal();
UIPortalApplication uiApp = uiPortal.getAncestorOfType(UIPortalApplication.class);
UserPortalConfigService service = uiApp.getApplicationComponent(UserPortalConfigService.class);
PortalRequestContext context = Util.getPortalRequestContext();
if (portalName != null
&& service.getUserPortalConfig(portalName, event.getRequestContext().getRemoteUser()) == null) {
uiApp.addMessage(new ApplicationMessage("UISiteManagement.msg.portal-not-exist", new String[] { portalName }));
context.addUIComponentToUpdateByAjax(uiApp.findFirstComponentOfType(UIWorkingWorkspace.class));
context.setFullRender(true);
return;
}
UIMaskWorkspace uiMaskWS = uiApp.getChildById(UIPortalApplication.UI_MASK_WS_ID);
UIPortalForm portalForm = uiMaskWS.createUIComponent(UIPortalForm.class, null, "UIPortalForm");
portalForm.setPortalOwner(portalName);
portalForm.setBindingBean();
uiMaskWS.setWindowSize(700, -1);
context.addUIComponentToUpdateByAjax(uiMaskWS);