UIPageNodeSelector uiNodeSelector = uiPageInfo.getChild(UIPageNodeSelector.class);
PageNavigation pageNavi = uiNodeSelector.getSelectedNavigation();
String ownerType = pageNavi.getOwnerType();
String ownerId = pageNavi.getOwnerId();
PageNode pageNode = uiPageInfo.getPageNode();
Page page = uiPageTemplateOptions.createPageFromSelectedOption(ownerType, ownerId);
page.setName("page" + page.hashCode());
String pageId = pageNavi.getOwnerType() + "::" + pageNavi.getOwnerId() + "::" + page.getName();
DataStorage storage = uiWizard.getApplicationComponent(DataStorage.class);
if (storage.getPage(pageId) != null)
{
uiPortalApp.addMessage(new ApplicationMessage("UIPageCreationWizard.msg.NameNotSame", null));
uiWizard.viewStep(FIRST_STEP);
uiWizard.updateWizardComponent();
}
page.setModifiable(true);
// Set default permissions on the page
setDefaultPermission(page, ownerType, ownerId);
if (page.getTitle() == null || page.getTitle().trim().length() == 0)
{
page.setTitle(pageNode.getName());
}
boolean isDesktopPage = Page.DESKTOP_PAGE.equals(page.getFactoryId());
if (isDesktopPage)
{