Databases Reference
In-Depth Information
deptno
) checksum
FROM emp)
The select statement for the empty column will run only if the REQUEST is set to the specified value.
Warning Change the column type to “standard report column”, otherwise you will see HTML code in your
report. The need to make this change is new in APEX 4, and has to do with security and cross-site scripting.
The next step is to create four buttons as follows:
A SUBMIT button to submit the page.
A MULTI_ROW_DELET button to delete rows. The target of this button will be this
URL:
javascript:apex.confirm(htmldb delete message,'MULTI ROW DELETE');
An ADD button to add new rows. This button will also submit the page.
A CANCEL button. This button will redirect to the same page.
Each of these buttons will be positioned in the report region.
You will also need to create at least two branching processes:
On Submit - After Processing When Button Pressed “ADD” Page 2 include
process success message Sequence 5 Conditional
On Submit - After Processing Unconditional Page 2 include process success
message Sequence 10
The first branching will submit the page and redirect to the same page.
You are now ready to write the code you will need for processing. You will create
two processes:
ApplyMRU : This process updates existing new rows. This process will be
conditional using the PL/SQL Expression: :REQUEST IN ('ADD', 'SUBMIT')
delete emp row , from Listing 3-3. This process and its associated package enable
you to delete rows. Since you already know how to use checksum to ensure data
integrity, you will not repeat that part in this example.
Finally, you need to add a validation:
Validate Commission: This is a page-level validation ensuring that you can enter a
commission value only for the department SALES, which is department 30. This
validation will be unconditional.
Listing 3-8 shows the procedure for updating and the validation in your package.
Search WWH ::




Custom Search