webMethods Business Console Documentation 10.5 | webMethods Business Console Documentation | Developing Gadgets for Business Console | Programming Gadgets | Defining Success and Error Notification in Gadgets
 
Defining Success and Error Notification in Gadgets
Use EventBus to trigger success and error notifications from a gadget.
To send success notifications, use the code below.
$scope.eventBus.fireEvent(NotificationConstants.SUCCESS,"PROVIDE YOUR
SUCCESS MESSAGE HERE");
To send error notifications, use the code below.
$scope.eventBus.fireEvent(NotificationConstants.ERROR,"PROVIDE YOUR
ERROR MESSAGE HERE");
You can send notifications to any place that is within the scope of the EventBus object. In the controller init block, add the EventBus in the $scope object so that the EventBus is easily accessed through the $scope object (such as directives).

Copyright © 2014-2019 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.