{
uiPageNodeSelector.selectPageNodeByUri(uri);
}
UIPortalApplication uiPortalApp = uiPageNodeSelector.getAncestorOfType(UIPortalApplication.class);
UIWizard uiWizard = uiPortalApp.findFirstComponentOfType(UIWizard.class);
event.getRequestContext().addUIComponentToUpdateByAjax(uiWizard);
if (!event.getSource().isEditMode())
{
return;
}
PageNode pageNode = uiPageNodeSelector.getSelectedPageNode();
if (pageNode == null && uiForm.isFirstTime())
{
uiForm.setShowPublicationDate(false);
uiForm.setFirstTime(false);
UIPortal uiPortal = Util.getUIPortal();
uiPageNodeSelector.selectNavigation(uiPortal.getSelectedNavigation());
if (uiPortal.getSelectedNode() != null)
{
uiPageNodeSelector.selectPageNodeByUri(uiPortal.getSelectedNode().getUri());
}
pageNode = uiPageNodeSelector.getSelectedPageNode();
}
if (pageNode == null)
{
uiForm.setShowPublicationDate(false);
return;
}
UserPortalConfigService configService = uiWizard.getApplicationComponent(UserPortalConfigService.class);
String accessUser = event.getRequestContext().getRemoteUser();
Page page = null;
if (pageNode.getPageReference() != null)
page = configService.getPage(pageNode.getPageReference(), accessUser);
if (page == null)