Creating editable form table using Buffer Data Provider in VBCS (Part3)
This is a continuation of previous blog . Now we must add logic to Cancel and Apply button and make sure the user changes are being recorded and pushed into BDP. Create a Boolean variable cancelEditVar and assign a default value as true to the same, this will later be user to record if the changes are to be discarded or pushed into BDP. For Cancel button create an ojAction event and assign cancelEditVar to true and editRow to { rowKey: null } Now for Apply button create an ojAction event and check to see if the form is valid and assign editRow to { rowKey: null } and assign cancelEditVar to false Now create an ojBeforeRowEditEnd event for the table, modify the cancelEdit property to pick value form cancelEditVar Create a new variable rowDataNew in ojBeforeRowEditEnd event and map the same to the variable rowData Create 2 functions areDifferent and mutateBDP to check if there is any difference between the old data and user edited data and the second function to actually mutate BDP ...