Developing Apama Applications > Building Dashboards > Defining Dashboard Commands > Supporting deletion of a scenario instance
Supporting deletion of a scenario instance
To add the Delete function to a dashboard you need to add a control object such as a push button and set its action to perform the delete.
1. Open the file tutorial-delete.rtv by selecting Delete Instance in the tutorial main page.
2. Double click on the object labeled Test to display the dashboard in a new window such that the control objects are enabled.
This dashboard displays a summary table of all instances of the tutorial scenario and a Delete button for deleting the selected instance.
3. Double click on the APMA row in the table. This will cause the scenario instance for APMA to become selected and its Instrument name displayed in the form above the Delete button.
4. Click on the Delete button. This will delete the APMA instance of the scenario as indicated by the APMA row being removed from the table.
As with Edit, when performing a Delete you need to identify the instance to be deleted.
5. Select the Delete button and in the Object Properties panel, double click on the actionCommand property.
Here the command is defined to delete the instance of the tutorial scenario whose instance id equals $instanceId.
Copyright © 2013 Software AG, Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, and/or Terracotta Inc., San Francisco, CA, USA, and/or Software AG (Canada) Inc., Cambridge, Ontario, Canada, and/or, Software AG (UK) Ltd., Derby, United Kingdom, and/or Software A.G. (Israel) Ltd., Or-Yehuda, Israel and/or their licensors.