Databases Reference
In-Depth Information
Apply MRU process for saving data on submit
Apply MRU process for saving data after adding a new row
Apply MRD process for deleting of data
AddRow process for adding one or multiple rows
APEX 4 requires only two of these processes. Only one MRU process is now needed, as new rows are
no longer added using server-side code. For the same reason, the AddRow process is redundant, and has
been removed.
Future Features We'd Like to See
The new Tabular Form feature of APEX 4 still has a couple of limitations. Hopefully most of them will be
solved in a future release of APEX.
Changes we would like to see include
Declarative validations outside the single column scope
Multiple tabular forms per page
Item type settings equal to those for page items
Autocomplete and Autocomplete Returning Key Value for Tabular Forms
Dynamic Actions for Tabular Forms
Some of what you will read in the rest of this chapter describes workarounds that you can put into
place to get some of the functionality in this list today.
Custom Coding in Tabular Forms
As already indicated, you will need to know how to write our own code in case you have some kind of a
validation you couldn't cover using column string comparison or you need to do some DML. The
following sections help you write custom code to cover some common use cases that you will encounter
while doing APEX development.
Processing the Correct Rows
Sometimes you have to write custom code for deleting rows from a Tabular Form. If you are faced with a
situation in which you need to do that, it's very important to be sure that your custom code actually does
delete the correct rows. You can put the Checkbox item to good use in identifying those rows to delete,
or to otherwise process in some way. You must be careful, though, to write your code correctly.
Listing 3-2 shows a common mistake made in deleting checked rows. The code will delete the right
number of rows, but not those you checked. The code will actually delete the rows starting from the first
row in the table and ending with n (representing the number of rows checked).
Listing 3-2. Deleting Checked Rows—Common Mistake
BEGIN
FOR i IN 1 .. apex application.g f01.COUNT
LOOP
Search WWH ::




Custom Search