// Perform model update
UserPortalConfigService configService = uiWorkingWS.getApplicationComponent(UserPortalConfigService.class);
DataStorage dataService = uiWorkingWS.getApplicationComponent(DataStorage.class);
PageService pageService = uiWorkingWS.getApplicationComponent(PageService.class);
try {
PageState pageState = new PageState(page.getTitle(), page.getDescription(), page.isShowMaxWindow(),
page.getFactoryId(), page.getAccessPermissions() != null ? Arrays.asList(page.getAccessPermissions())
: null, page.getEditPermission());
pageService.savePage(new PageContext(pageKey, pageState));
dataService.save(page);
} catch (StaleModelException ex) {