public void execute(Event<UIGroupNavigationManagement> event) throws Exception
{
UIGroupNavigationManagement uicomp = event.getSource();
WebuiRequestContext context = event.getRequestContext();
UIApplication uiApplication = context.getUIApplication();
// get navigation id
String id = event.getRequestContext().getRequestParameter(OBJECTID);
Integer navId = Integer.parseInt(id);
// get PageNavigation by navigation id
PageNavigation navigation = uicomp.getNavigationById(navId);
// 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;
}
// TODO 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;
}
// remove selected navigation
if (uicomp.navigations == null || uicomp.navigations.size() < 1)