// get navigation id
String id = event.getRequestContext().getRequestParameter(OBJECTID);
Integer navId = Integer.parseInt(id);
// get PageNavigation by navigation id
PageNavigation navigation = uicomp.getNavigationById(navId);
uicomp.setSelectedNavigation(navigation);
WebuiRequestContext context = event.getRequestContext();
UIApplication uiApplication = context.getUIApplication();
// check edit permission, ensure that user has edit permission on that
// navigation
UserACL userACL = uicomp.getApplicationComponent(UserACL.class);
if (!userACL.hasEditPermission(navigation))
{
uiApplication.addMessage(new ApplicationMessage("UIGroupNavigationManagement.msg.Invalid-editPermission", null));
return;
}
// ensure this navigation is exist
DataStorage service = uicomp.getApplicationComponent(DataStorage.class);
if (service.getPageNavigation(navigation.getOwnerType(), navigation.getOwnerId()) == null)
{
uiApplication.addMessage(new ApplicationMessage("UIGroupNavigationManagement.msg.navigation-not-exist", null));
return;
}
UIPopupWindow popUp = uicomp.getChild(UIPopupWindow.class);
UINavigationManagement pageManager = popUp.createUIComponent(UINavigationManagement.class, null, null, popUp);
pageManager.setOwner(navigation.getOwnerId());
pageManager.setOwnerType(navigation.getOwnerType());
UINavigationNodeSelector selector = pageManager.getChild(UINavigationNodeSelector.class);
selector.setEdittedNavigation(navigation);
selector.initTreeData();