Managing toolbar buttons depending on the grid selection's status
Now reading and writing of the data is complete. There's only the Add
function in the list, so at present we can only add new information. Let's create it so we can click on the Edit and Remove buttons. After this we can implement the various functions. This implementation happens in ct/quotation/app_list.html
.
Let's control the events when items are selected and deselected in the list. Also, we'll implement it so when you double-click on an item, it will perform in the same way as when you click on the Edit button.
We'll add the following event handler to the process occurring in the control of the init
method of the MyApp.controller.quotation.List
class (source file: 06_management_toolbar_buttons_depend_on_grid_selection_status/app/controller/quotation/List.js
).
.... 'myapp-quotation-list': { 'myapp-show': me.onShow, 'select': me.onSelect, 'itemdblclick...