Databases Reference
In-Depth Information
Let's look at how to write the code for a manual Tabular Form. You will use only the following item
types:
apex_item.hidden
apex_item.checkbox
apex_item.text
You will also use the apex_item package and parse parameters for
Column array
Column value
Column size
Column max length
Create a second page (page 2) and call it Tabular Form 2. After that, create a report region for your
manual Tabular Form. You will need to use a subquery. In the subquery you will create one empty row
first, to be able to enter new rows upon request. You will also need to generate a checksum for the rows
which you will use later on to check which rows have changed and run an update for those. Listing 3-7
shows our SELECT statement along with its subquery.
Listing 3-7. Manual Tabular Form—SQL
SELECT apex item.checkbox (1, '#ROWNUM#') empno,
apex item.hidden (2, empno)
|| apex item.text (3, ename, 20, 20) ename,
apex item.text (4, job, 10, 10) job,
apex item.text (5, mgr, 5, 5) mgr,
apex item.text (6, hiredate, 12, 12) hiredate,
apex item.text (7, sal, 6, 6) sal,
apex item.text (8, comm, 6, 6) comm,
apex item.text (9, deptno, 4, 4)
|| apex item.hidden (10, checksum) deptno
FROM (SELECT NULL empno, NULL ename, NULL job,
NULL mgr, NULL hiredate,
NULL sal, NULL comm, NULL deptno,
NULL checksum
FROM DUAL
WHERE :request IN ('ADD')
UNION ALL
SELECT empno, ename, job, mgr, hiredate,
sal, comm, deptno,
wwv flow item.md5 (empno,
ename,
job,
mgr,
hiredate,
sal,
comm,
Search WWH ::




Custom Search