service.createUserPortalConfig(PortalConfig.PORTAL_TYPE, portalName, template);
UserPortalConfig userPortalConfig = service.getUserPortalConfig(portalName, pcontext.getRemoteUser());
PortalConfig pconfig = userPortalConfig.getPortalConfig();
uiForm.invokeSetBindingBean(pconfig);
PageNavigation navigation = dataService.getPageNavigation(PortalConfig.PORTAL_TYPE, portalName);
dataService.save(pconfig);
dataService.save(navigation);
UIPortalApplication uiPortalApp = event.getSource().getAncestorOfType(UIPortalApplication.class);
UIMaskWorkspace uiMaskWS = uiPortalApp.getChildById(UIPortalApplication.UI_MASK_WS_ID);
uiMaskWS.setUIComponent(null);
pcontext.addUIComponentToUpdateByAjax(uiMaskWS);