Databases Reference
In-Depth Information
THEN
v error :=
v error
|| '<br/>'
|| 'Row '
|| i
|| ': The version of the data in the '
|| 'table has been change since the last page '
|| 'rendering. Click <a href="f?p='
|| v ('APP ID')
|| ':'
|| v ('APP PAGE ID')
|| ':'
|| v ('APP SESSION')
|| '">here</a> to reload the page.';
END IF;
END LOOP;
v error := LTRIM(v error, '<br/>');
RETURN v error;
END validate data integrity;
You can test this code by creating a page validation of type PL/SQL Function Returning Error
Message, using sequence number 1 for the process, and naming the process Check Data Integrity. Set
the process to unconditional and enter the required call to the package procedure. Here is the PL/SQL
code for the page validation:
BEGIN
RETURN tab form emp pkg.validate data integrity;
END;
Next, change one of the records using some other tool such as SQL Workshop, and commit your
changes. Go to the Tabular Form, change the same record and submit the change. You should see an
error message similar to that in Figure 3-20.
Figure 3-20. Tabular Form—Data Integrity Validation Error
You don't need to use the technique described in this section in a standard Tabular Form. A similar
message will be generated automatically in a standard form. You need the technique and code in this
section only in a manually generated Tabular Form.
Manual Tabular Forms
As long as APEX doesn't allow creation of multiple standard Tabular Forms per page, you will be faced
with a requirement to create a workaround for those cases in which you need to manage one master
table with multiple detail tables.
Search WWH ::




Custom Search