Databases Reference
In-Depth Information
Other Features
APEX 4 also introduced a couple of other neat features. One is protection against lost updates when you
resort or paginate through your data. Another is the ability to add new rows to a form without making a
round trip to the server for each row added. Finally, the overall number of processes has been reduced.
Lost Update Protection
APEX 4 will inform you about the changes you made and about the risk of losing your changes if you try
to change the sorting of the Tabular Form or try to paginate through the Tabular Form. Figure 3-16
shows this warning message.
Figure 3-16. Tabular Form— lost update protection
Client-Side Add Row Functionality
In earlier versions, the process for adding new rows to a Tabular Form would require you to submit and
load your page once per new row. This process had to validate and save changes each time you added a
new row. The Add Row functionality is done by using new JavaScript function:
javascript:addRow();
You can find the function's invocation in the ADD button, as the URL Target.
After the initial rendering of a Tabular Form, APEX will remove that new row from the DOM and put
it in a JavaScript variable. After pressing the ADD button, JavaScript will replace some of the substitution
strings in that variable (index, names, etc.) and add that row again to the end of the table. If you want to
add multiple rows to a tabular form, the only thing you need to do is to press the button again.
Reduced Number of Processes
The addition of functionality to add new rows using client-side code brings the additional benefit of
reducing the number of processes required for DML. Earlier versions of APEX required four submit
processes for DML:
Search WWH ::




Custom Search