Table data changed when service is called Follow
How does table row click works?
We set the values that are on the first line into session storage - into _0 value.
Why?
because when you move from that page to the next page you want to have the values of that parameter to be set into 'details' or other 'row selected' data - and it is usually _0.
Issues and solutions
Q. if the table is regenerated - then the first row (_0) is being overridden with the value of the row that was selected
A.Perform 'backup' of the values, and restore when required.
backup by replacing in the table click:
storeFromIndex("B1_COMPID_0", row);
with
Storage.backupAndCopyFromIndex("B1_COMPID_0", row);
and when you need to reload the previous data, perform:
Services.call("shouldDecline", successFunction)
Q. When I call to other service from the 'ontableClick' - the table is refreshed, and then the data is incorrect.
A. when you click on the table - restore from backup, store into back the field, and disable the population of the table.example:
function showActionsMenu(row, col, rowCells) {
Storage.restoreBackups()
Storage.backupAndCopyFromIndex("B1_COMPID_0", row);
Storage.backupAndCopyFromIndex("B1_DEAL_ID_0", row);
populateTableOrList=function(){} //disable table repaint (would repaint since we called another service)
Services.call("shouldDecline", successFunction)
}
Comments
0 comments
Please sign in to leave a comment.