@Override public void execute(Event<UIPopupWindow> event) throws Exception { UIPopupWindow uiPopup = event.getSource(); UISpaceNavigationManagement uiSpaceNavManagement = uiPopup.getAncestorOfType(UISpaceNavigationManagement.class); UISpaceNavigationNodeSelector selector = uiSpaceNavManagement.getChild(UISpaceNavigationNodeSelector.class); UserNavigation contextNavigation = selector.getEdittedNavigation(); uiPopup.setShow(false); uiSpaceNavManagement.setOwner(contextNavigation.getKey().getName()); uiSpaceNavManagement.setOwnerType(contextNavigation.getKey().getTypeName()); selector.setEdittedNavigation(contextNavigation); selector.initTreeData(); event.getRequestContext().addUIComponentToUpdateByAjax(uiSpaceNavManagement); }
public void reloadTreeData() throws Exception { UserPortal userPortal = Util.getUIPortalApplication().getUserPortalConfig().getUserPortal(); SpaceService spaceService = getApplicationComponent(SpaceService.class); String spaceUrl = Utils.getSpaceUrlByContext(); Space space = spaceService.getSpaceByUrl(spaceUrl); UserNavigation groupNav = SpaceUtils.getGroupNavigation(space.getGroupId()); setOwner(groupNav.getKey().getName()); setOwnerType(groupNav.getKey().getTypeName()); UISpaceNavigationNodeSelector selector = getChild(UISpaceNavigationNodeSelector.class); selector.setEdittedNavigation(groupNav); selector.setUserPortal(userPortal); selector.initTreeData(); }