DBA Data[Home] [Help]

PACKAGE BODY: APPS.ICXUI_API_UTIL

Source


1 package body icxui_api_util as
2 /* $Header: ICXUIUTB.pls 115.0 99/10/28 23:26:48 porting ship    $ */
3 
4 procedure draw_title
5 (
6     p_title     in varchar2
7 )
8 is
9 begin
10 
11     --
12     -- Draw the topmost title region with rounded corners.
13     --
14     htp.p ('<TD>'); --wwutl_htp.tableDataOpen;
15     htp.tableOpen(cattributes => 'BORDER="0" CELLPADDING="0" CELLSPACING="0"');
16     htp.tableRowOpen;
17     htp.tableData(htf.img('/OA_MEDIA/uiwizrul.gif',
18         cattributes => 'VALIGN="TOP"'));
19 
20     htp.tableData(htf.fontOpen(ccolor => '#E0E0E0',
21                                cface => 'arial,helvetica', csize=> '-1')
22             || htf.bold(p_title)
23             || htf.fontClose,
24             cattributes => 'WIDTH="98%" BGCOLOR="#000066" ROWSPAN="2"');
25 
26     htp.tableData(htf.img('/OA_MEDIA/uiwizrur.gif',
27         cattributes => 'VALIGN="TOP"'));
28     htp.tableRowClose;
29     htp.tableRowOpen;
30     htp.tableData(htf.img('/OA_MEDIA/red.gif',
31         cattributes => 'BGCOLOR="#000066"'));
32     htp.tableData(htf.img('/OA_MEDIA/red.gif',
33         cattributes => 'BGCOLOR="#000066"'));
34     htp.tableRowClose;
35     htp.tableClose;
36     htp.p ('</TD>'); --wwutl_htp.tableDataClose;
37 
38 end draw_title;
39 
40 procedure draw_image
41 (
42     p_image in varchar2
43 )
44 is
45 begin
46     --
47     -- Draw the image bit
48     --
49     htp.tableData(htf.img('/OA_MEDIA/' || p_image,
50             cattributes=>'VALIGN="TOP" BORDER="0"'),
51             cattributes => 'VALIGN="TOP"', crowspan => 2);
52 end draw_image;
53 
54 procedure draw_footer
55 is
56 begin
57     --
58     -- Draw the Footer for the wizard
59     --
60 
61     htp.p('<TD>'); --wwutl_htp.tableDataOpen;
62     htp.tableOpen(cattributes => 'BORDER="0" CELLPADDING="0" CELLSPACING="0"');
63     htp.tableRowOpen;
64     htp.tableData(htf.img('/OA_MEDIA/uiwizrll.gif'));
65     htp.tableData(htf.img('/OA_MEDIA/red.gif'),
66         cattributes => 'WIDTH="98%" BGCOLOR="#000066"');
67     htp.tableData(htf.img('/OA_MEDIA/uiwizrlr.gif'));
68     htp.tableRowClose;
69     htp.tableClose;
70     htp.p('</TD>'); --wwutl_htp.tableDataClose;
71 end draw_footer;
72 
73 
74 procedure draw_subheader
75 (
76     p_subheader_text in varchar2
77 )
78 is
79 begin
80     --
81     -- Draw the SubHeader Title
82     --
83     htp.tableData(htf.fontOpen(ccolor => '#6666CC',
84                                cface => 'arial,helvetica', csize => '-1')
85                   || htf.bold(p_subheader_text)
86                   || htf.fontClose);
87 end draw_subheader;
88 
89 procedure draw_helptext
90 (
91     p_help_text in varchar2
92 )
93 is
94 begin
95     --
96     -- Draw the Help Text
97     --
98     htp.tableData(htf.fontOpen(cface => 'arial,helvetica', csize => '-1')
99                   || p_help_text
100                   || htf.fontClose);
101 
102 end draw_helptext;
103 
104 procedure draw_buttons
105 (
106     p_buttons icxui_api_button_list
107 )
108 is
109 begin
110     --
111     -- Draw the Buttons
112     --
113     --wwutl_htp.tableDataOpen(calign => 'RIGHT', cattributes => 'VALIGN="TOP"');
114     htp.p('<TD align="RIGHT" VALIGN="TOP">');
115     htp.tableOpen(cattributes => 'BORDER="0" CELLPADDING="1" CELLSPACING="4"');
116     htp.tableRowOpen;
117 
118     for i in 1..p_buttons.count loop
119         htp.tableData(icxui_api_util.formButton('p_request',
120            p_buttons(i).button_name,
121            cattributes =>
122                       'WIDTH="80" onClick="'||p_buttons(i).button_url||'"'),
123          cattributes => 'BGCOLOR="#999999"');
124     end loop;
125 
126     htp.tableRowClose;
127     htp.tableClose;
128     htp.p('<TD>'); --wwutl_htp.tableDataClose;
129 
130 end draw_buttons;
131 
132 
133 function IFNOTNULL
134     (
135         str1 in varchar2,
136         str2 in varchar2
137     )
138     return varchar2 is
139     begin
140         if (str1 is NULL) then
141             return (NULL);
142         else
143             return (str2);
144         end if;
145 end IFNOTNULL;
146 
147 function formButton
148 (
149 cname in varchar2 DEFAULT NULL,
150 cvalue in varchar2 DEFAULT NULL,
151 cattributes in varchar2 DEFAULT NULL
152 )
153 return varchar2 is
154 begin
155 return('<INPUT TYPE="button" NAME="'||cname||'"'||
156       IFNOTNULL(cvalue,' VALUE="'||cvalue||'"')||
157       IFNOTNULL(cattributes,' '||cattributes)||
158      '>');
159 end formButton;
160 
161 
162 function get_text_style
163 (
164     p_str in varchar2
165 )
166 return varchar2
167 is
168 begin
169     --
170     -- Set the font for the text
171     --
172      return  htf.fontOpen(ccolor => '#000000',
173                           cface => 'arial,helvetica', csize => '-1')
174              || htf.nobr(p_str)
175              || htf.fontClose;
176 
177 end get_text_style;
178 
179 procedure draw_path_text
180 (
181     p_path_text in varchar2
182 )
183 is
184 
185 begin
186 
187     htp.tableData(htf.fontOpen(ccolor => '#666666',
188                           cface => 'arial,helvetica', csize => '-2')
189              || htf.nobr(htf.bold(p_path_text))
190              || htf.fontClose,
191              cattributes => 'ALIGN="LEFT"');
192 
193 end draw_path_text;
194 
195 end icxui_api_util;