The AFPController object controls access to various events that occur during navigation and other actions in the framework page.
All methods of this object should be called with the following prefix:
EPCM.getSAPTop().LSAPI.AFPPlugin.controller..
registerOnNavigate(func, onlyNode)
Enables calling a notification function each time a navigation event occurs.
Parameter |
Description |
---|---|
func(currentNode) |
A notification function to call when navigation is performed. The function receives the current navigation node as a parameter. |
onlyNode |
If true, the callback function receives only the node itself rather than a pointer to the tree, which can be used to improve performance. Otherwise, the node is received with additional data, which allows exploring the tree. |
Return Value
None
Example
EPCM.getSAPTop().LSAPI.AFPPlugin.controller.registerOnNavigate(createNavigationMenu); function createNavigationMenu(currentNode) { currentNode.getTitle(); }
registerOnPreNavigate()
Occurs after a click event before the actual navigation. Does not receive any parameters and return any values.