Page History
...
Code Block | ||||
---|---|---|---|---|
| ||||
{ $foundsetTypeConstants.NOTIFY_VIEW_PORT_ROWS_COMPLETELY_CHANGED: { oldValue : ..., newValue : ... }, // if we received add/remove/change operations on a set of properties from modelViewport // corresponding to a record this key will be set; as seen below, it contains "updates" which // is an array that holds a sequence of granular update operations to the viewport; the array // will hold one or more granular add or remove or change operations; // // BEFORE Servoy 8.4: all the "startIndex" and "endIndex" values below are relative to the viewport's state after all // state after //all previous updates in the array were already processed (so they are NOT relative to the initial // the initial or final state); indexesof arethe 0 based $foundsetTypeConstants.NOTIFY_VIEW_PORT_ROW_UPDATES_RECEIVED: { // sometimes knowing the old viewport size helps calculate incomming granular updates easierviewport data!). Updates can come in a random order so there is // NO guarantee related to each change/insert/delete indexes pointing to the correct new data in the // final current viewport state // // STARTING WITH Servoy 8.4: all the "startIndex" and "endIndex" values below are relative to the // viewport's state after all previous updates in the array were already processed. But due to some // pre-processing that happens server-side (it merges and sorts these ops), the indexes of update // operations THAT POINT TO DATA (so ROWS_INSERTED and ROWS_CHANGED operations) are relative also to // the viewport's final/current state, so after ALL updates in the array were already processed // (so these indexes are correct both related to the intermediate state of the viewport data // and to the final state of viewport data). // This means that it is now easier to apply UI changes to the component as these granular updates // GUARANTEE that if you apply them in sequence (one by one) to the component's UI (delete, insert and // change included) you can safely use the indexes in there to get new data from the present state // of the viewport. // $foundsetTypeConstants.NOTIFY_VIEW_PORT_ROW_UPDATES_RECEIVED: { // DEPRECATED in Servoy 8.4: granular updates are much easier to apply now; see comment above // sometimes knowing the old viewport size helps calculate incomming granular updates easier $foundsetTypeConstants.NOTIFY_VIEW_PORT_ROW_UPDATES_OLD_VIEWPORTSIZE: ..., $foundsetTypeConstants.NOTIFY_VIEW_PORT_ROW_UPDATES : [ { type : $foundsetTypeConstants.ROWS_CHANGED, startIndex : ..., endIndex : ... }, { $foundsetTypeConstants.NOTIFY_VIEW_PORT_ROW_UPDATES_OLD_VIEWPORTSIZE: ..., // NOTE: insert signifies an insert into the client viewport, not necessarily $foundsetTypeConstants.NOTIFY_VIEW_PORT_ROW_UPDATES : [ { // an insert in the foundset itself; for example calling "loadExtraRecordsAsync" type : $foundsetTypeConstants.ROWS_CHANGED, // on the foundset property startIndex : ..., // can result in an insert notification + bigger viewport endIndexsize :notification, ... }, // with removedFromVPEnd = 0 { type // when an INSERT happened but viewport size remained the same, it is: $foundsetTypeConstants.ROWS_INSERTED, startIndex : ..., // possible that some of the rows that were previously at theendIndex end of the viewport: ..., // DEPRECATED slidedstarting outwith ofServoy it8.4; "removedFromVPEnd"it giveswould thealways numberbe of such rows that were removed0 here // as // from the end of the viewport due to the insert operation;server-side code will add a separate delete operation instead - if necessary // BEFORE NOTE8.4: insertwhen signifies an insertINSERT intohappened thebut client viewport, notsize necessarilyremained the same, it was // an insert in the foundset itself; for example calling "loadExtraRecordsAsync" // possible for some of the rows that were previously at the end of the viewport // on the foundset property // to slide out of it; "removedFromVPEnd" gives the number of //such canrows resultthat inwere an insert notification + bigger viewport size notification, // removed from the end of the viewport //due withto removedFromVPEndthis =insert 0operation; typeremovedFromVPEnd : $foundsetTypeConstants.ROWS_INSERTED,... }, startIndex : ..., { endIndex : ..., // NOTE: delete signifies a delete from the client viewport, not necessarily removedFromVPEnd : ... // a delete in },the foundset itself; for example calling "loadLessRecordsAsync" { // on the foundset property // when a DELETE happened inside the viewport but there were more rows available in the // can result in a delete notification + smaller viewport size notification, // foundset after current viewport, it is possible that some of those rows // with appendedToVPEnd = 0 // slided into the viewport; "appendedToVPEnd " gives the number of such rows // that were appended to the endtype of the viewport due to the DELETE operation: $foundsetTypeConstants.ROWS_DELETED, startIndex : ..., // NOTE: delete signifies a delete from the client viewport, not necessarily endIndex : ..., // a delete in the foundset itself; for example calling "loadLessRecordsAsync" // DEPRECATED starting with Servoy 8.4; it would always be 0 here // on the foundset property // as server-side code will add a separate insert operation instead - if necessary // can result in a delete notification + smaller viewport size notification, // BEFORE 8.4: when a DELETE happened inside the viewport but there were //more withrows appendedToVPEnd = 0 // available in the foundset after current viewport, it was possible for some of those // typerows : $foundsetTypeConstants.ROWS_DELETED, to slide into the viewport; "appendedToVPEnd " gives the number of such rows startIndex : ..., // that were appended to the end of the viewport due to endIndexthis : ...,delete operation appendedToVPEnd : ... } ] } } |
You In Servoy < 8.4, you might find what $foundsetTypeUtils provides useful depending on how you plan on using this listener.
...
Overview
Content Tools
Activity