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

来源:互联网 发布:星落五丈原 知乎 编辑:程序博客网 时间:2024/06/03 20:26
Create Dynamic Content Region in Oracle APEX (PL/SQL Dynamic Content)
1- Introduction
2- Creating dynamic HTML content region
http://blog.csdn.net/sunansheng/article/details/50408998

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
   Cursorc_Dept Is
      SelectDeptno
            ,Dname
            ,Loc
      From  Dept;
   --
   Cursorc_Emp(p_Deptno Number) Is
      SelectEmpno
            ,Ename
            ,Job
      From  Emp
      Where Emp.Deptno = p_Deptno;
Begin  
   Htp.p('<div class="mytree-container">');
   --
   ForRec_d Inc_Dept Loop
      Htp.p('<ul>');
      Htp.p('<h4>'|| Rec_d.Dname || '</h4>');
      --
      ForRec_e Inc_Emp(Rec_d.Deptno) Loop
         Htp.p('<li>'|| Rec_e.Ename || '</li>');
      EndLoop;
      --
      Htp.p('</ul>');
   EndLoop;
   -- 
   Htp.p('</div>');
End;
Running the example:
Custom Style (CSS)
  • TODO
1 0
原创粉丝点击