Oracle APEX 5.0 新手教程(四) 页面动态生成

Create Dynamic Content Region in Oracle APEX (PL/SQL Dynamic Content)

1- Introduction

This document is based on:
  • Oracle APEX 5.0

2- Creating dynamic HTML content region

Create a Blank Page:
  • !
Create new region:
  • !
  • PL/SQL Code
?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
Declare
    Cursor c_Dept Is
       Select Deptno
             ,Dname
             ,Loc
       From   Dept;
    --
    Cursor c_Emp(p_Deptno Number) Is
       Select Empno
             ,Ename
             ,Job
       From   Emp
       Where  Emp.Deptno = p_Deptno;
Begin  
    Htp.p( '<div class="mytree-container">' );
    --
    For Rec_d In c_Dept Loop
       Htp.p( '<ul>' );
       Htp.p( '<h4>' || Rec_d.Dname || '</h4>' );
       --
       For Rec_e In c_Emp(Rec_d.Deptno) Loop
          Htp.p( '<li>' || Rec_e.Ename || '</li>' );
       End Loop;
       --
       Htp.p( '</ul>' );
    End Loop;
    -- 
    Htp.p( '</div>' );
End ;
Running the example:
Custom Style (CSS)
  • TODO
相关推荐
©️2020 CSDN 皮肤主题: 编程工作室 设计师:CSDN官方博客 返回首页