Oracle Application Express 5: Developing Web Applications — Question 36
Maurice wants to have a report on employees, which shows only employees or the department selected in a select list item. He has created a report, called
REPORT_1, based on the EMP table. Above the region, he has defined a select list called P6_DEPTNO. Maurice has added the correct Where clause for
REPORT_1 and defined an "on change" dynamic action on P6_DEPTNO to refresh the REPORT_1 region. When he runs the page, no data is displayed, irrespective of the department selected.
What must Maurice do to get the page to work correctly?
Answer options
- A. Add a set value action, before the refresh action, of type PL/SQL Expression with code of :P6_DEPTNO and items to submit to P6_DEPTNO.
- B. On the REPORT_1 region, set page items to submit to P6_DEPTNO.
- C. In the "on change" dynamic action, set page items to submit to P6_DEPTNO.
- D. In the "on change" dynamic action, set event scope to "dynamic".
Correct answer: C
Explanation
The correct answer is C because it ensures that the value of P6_DEPTNO is submitted when the dynamic action triggers, allowing REPORT_1 to correctly filter based on the selected department. Options A and B do not address the requirement to submit the page item during the dynamic action, while option D changes the event scope but does not resolve the submission problem.