TreeView menu action that changes available menu actions
In our application we have items in a treeview that can be blocked and unblocked. This action can be triggered using the context menu. Now it's easy enough to add the context menu for either in the TreeController's GetMenuForNode() method, but how do I make it change to the other once one option has been used.
I have a javascript function that sits behind the confirm button for either action. What I need to do now is:
Refresh the treenode to have a different icon
Refresh the main content to show the status behind the 'status' label
Refresh the possible actions to now include either Block or Unblock depending on the action that was just used.
I can use the following javascript to update the icon: treeService.reloadNode($scope.currentNode);
But how do I update the main content? The javascript controller that calls the API method on the server is attached to the confirm-block.html template of the action menu. The $scope available here does not provide access to the content of the main area.
Finally, how can I cause the menu actions to refresh. I would've thought that reloading the treenode would also cause the actions associated with that tree node to be refreshed as well. This does not seem to be the case.
TreeView menu action that changes available menu actions
In our application we have items in a treeview that can be blocked and unblocked. This action can be triggered using the context menu. Now it's easy enough to add the context menu for either in the TreeController's GetMenuForNode() method, but how do I make it change to the other once one option has been used.
I have a javascript function that sits behind the confirm button for either action. What I need to do now is:
I can use the following javascript to update the icon:
treeService.reloadNode($scope.currentNode);
But how do I update the main content? The javascript controller that calls the API method on the server is attached to the confirm-block.html template of the action menu. The $scope available here does not provide access to the content of the main area.
Finally, how can I cause the menu actions to refresh. I would've thought that reloading the treenode would also cause the actions associated with that tree node to be refreshed as well. This does not seem to be the case.
is working on a reply...