[Home] [Help]
PACKAGE BODY: APPS.ICX_ON_UTILITIES2
Source
1 package body icx_on_utilities2 as
2 /* $Header: ICXONVB.pls 120.0 2005/10/07 12:16:53 gjimenez noship $ */
3
4 procedure displaySetIcons(p_language_code in varchar2,
5 p_packproc in varchar2,
6 p_start_row in number,
7 p_stop_row in number,
8 p_encrypted_where in number,
9 p_query_set in number,
10 p_row_count in number,
11 p_top in boolean,
12 p_jsproc in varchar2,
13 p_hidden in varchar2,
14 p_update in boolean,
15 p_target in varchar2) is
16 l_target varchar2(240);
17 l_title varchar2(80);
18 l_prompts icx_util.g_prompts_table;
19 l_message varchar2(2000);
20 l_parameter varchar2(2000);
21 l_start_row number;
22 l_stop_row number;
23 begin
24
25 icx_util.getPrompts(601,'ICX_WEB_ON',l_title,l_prompts);
26
27 if p_target is null
28 then
29 l_target := 'self';
30 else
31 l_target := p_target;
32 end if;
33
34 if p_top
35 then
36 if p_update
37 then
38 htp.p('<SCRIPT LANGUAGE="JavaScript">');
39 htp.p('<!-- Hide from old browsers');
40 fnd_message.set_name('ICX','ICX_PROCEED_WITHOUT_SAVE');
41 l_message := icx_util.replace_quotes(fnd_message.get);
42 htp.p('function set_icon(X) {
43 if (confirm("'||l_message||'")) {
44 '||l_target||'.location="'||icx_cabo.g_base_href||'" + X;
45 }
46 }');
47
48 htp.p('// -->');
49 htp.p('</SCRIPT>');
50 else
51 htp.p('<SCRIPT LANGUAGE="JavaScript">');
52 htp.p('<!-- Hide from old browsers');
53 htp.p('function set_icon(X) {
54 '||l_target||'.location="'||icx_cabo.g_base_href||'" + X;
55 }');
56 htp.p('// -->');
57 htp.p('</SCRIPT>');
58 end if;
59 end if;
60
61 htp.tableOpen(cborder => 'BORDER=0', cattributes => 'WIDTH="100%"');
62 htp.tableRowOpen;
63
64 if p_start_row <= 1
65 then
66 if p_stop_row < p_row_count
67 then
68 htp.p('<TD>');
69 htp.img(curl => '/OA_MEDIA/FNDIFRSD.gif', cattributes => 'width=22 height=22');
70 htp.p('</TD>');
71 htp.p('<TD>');
72 htp.p('</TD>');
73 htp.p('<TD>');
74 htp.img(curl => '/OA_MEDIA/FNDIPRED.gif', cattributes => 'width=22 height=22');
75 htp.p('</TD>');
76 htp.p('<TD>');
77 htp.p('</TD>');
78 end if;
79 else
80 fnd_message.set_name('ICX','ICX_TABLE_SET');
81 fnd_message.set_token('FROM_ROW_TOKEN','1');
82 fnd_message.set_token('TO_ROW_TOKEN',p_query_set);
83 l_message := fnd_message.get;
84
85 htp.p('<TD>');
86 if p_jsproc is null then
87 l_parameter := '?p_start_row='||1||'&'||'p_end_row='||p_query_set||'&'||'p_where='||p_encrypted_where;
88 if p_hidden is not null
89 then
90 l_parameter := l_parameter||'&'||'p_hidden='||p_hidden;
91 end if;
92 htp.anchor('javascript:set_icon('''||p_packproc||l_parameter||''')',
93 htf.img(curl => '/OA_MEDIA/FNDIFRST.gif', calt => icx_util.replace_alt_quotes(l_prompts(1)),
94 cattributes => 'width=22 height=22 BORDER=0'),'',' onMouseOver="window.status='''||icx_util.replace_OnMouseOver_quotes(l_message)||''';return true"');
95 else
96 htp.anchor('javascript:'||p_jsproc||'(''1'','''||p_query_set||''')',
97 htf.img(curl => '/OA_MEDIA/FNDIFRST.gif', calt =>icx_util.replace_alt_quotes(l_prompts(1)),
98 cattributes => 'width=22 height=22 BORDER=0'),'',' onMouseOver="window.status='''||icx_util.replace_OnMouseOver_quotes(l_message)||''';return true"');
99 end if;
100 htp.p('</TD>');
101 htp.p('<TD>');
102 htp.p('</TD>');
103
104 fnd_message.set_name('ICX','ICX_TABLE_SET');
105 if p_start_row-p_query_set < 1
106 then
107 l_start_row := 1;
108 else
109 l_start_row := p_start_row-p_query_set;
110 end if;
111 fnd_message.set_token('FROM_ROW_TOKEN',l_start_row);
112 fnd_message.set_token('TO_ROW_TOKEN',p_start_row-1);
113 l_message := fnd_message.get;
114
115
116 htp.p('<TD>');
117 if p_jsproc is null then
118 l_parameter := '?p_start_row='||to_char(l_start_row)||'&'||'p_end_row='||to_char(p_start_row-1)||'&'||'p_where='||p_encrypted_where;
119 if p_hidden is not null
120 then
121 l_parameter := l_parameter||'&'||'p_hidden='||p_hidden;
122 end if;
123 htp.anchor('javascript:set_icon('''||p_packproc||l_parameter||''')',
124 htf.img(curl => '/OA_MEDIA/FNDIPREV.gif', calt => icx_util.replace_alt_quotes(l_prompts(2)),
125 cattributes => 'width=22 height=22 BORDER=0'),'',' onMouseOver="window.status='''||icx_util.replace_OnMouseOver_quotes(l_message)||''';return true"');
126 else
127 htp.anchor('javascript:'||p_jsproc||'('''||to_char(l_start_row)||''','''||to_char(p_start_row-1)||''')',
128 htf.img(curl => '/OA_MEDIA/FNDIPREV.gif', calt => icx_util.replace_alt_quotes(l_prompts(2)),
129 cattributes => 'width=22 height=22 BORDER=0'),'',' onMouseOver="window.status='''||icx_util.replace_OnMouseOver_quotes(l_message)||''';return true"');
130 end if;
131 htp.p('</TD>');
132 htp.p('<TD>');
133 htp.p('</TD>');
134
135 end if;
136 fnd_message.set_name('ICX','ICX_RECORDS_RANGE');
137 fnd_message.set_token('FROM_ROW_TOKEN',p_start_row);
138 fnd_message.set_token('TO_ROW_TOKEN',p_stop_row);
139 fnd_message.set_token('TOTAL_ROW_TOKEN',p_row_count);
140 l_message := fnd_message.get;
141
142 htp.p('<TD NOWRAP>'||l_message||'</TD>');
143
144 if p_stop_row >= p_row_count
145 then
146 if p_start_row > 1
147 then
148 htp.p('<TD>');
149 htp.p('</TD>');
150 htp.p('<TD>');
151 htp.img(curl => '/OA_MEDIA/FNDINEXD.gif', cattributes => 'width=22 height=22');
152 htp.p('</TD>');
153 htp.p('<TD>');
154 htp.p('</TD>');
155 htp.p('<TD>');
156 htp.img(curl => '/OA_MEDIA/FNDILASD.gif', cattributes => 'width=22 height=22');
157 htp.p('</TD>');
158 end if;
159 else
160 fnd_message.set_name('ICX','ICX_TABLE_SET');
161 fnd_message.set_token('FROM_ROW_TOKEN',p_stop_row+1);
162 if p_stop_row+p_query_set > p_row_count
163 then
164 l_stop_row := p_row_count;
165 else
166 l_stop_row := p_stop_row+p_query_set;
167 end if;
168 fnd_message.set_token('TO_ROW_TOKEN',l_stop_row);
169 l_message := fnd_message.get;
170
171 htp.p('<TD>');
172 if p_jsproc is null then
173 l_parameter := '?p_start_row='||to_char(p_stop_row+1)||'&'||'p_end_row='||to_char(l_stop_row)||'&'||'p_where='||p_encrypted_where;
174 if p_hidden is not null
175 then
176 l_parameter := l_parameter||'&'||'p_hidden='||p_hidden;
177 end if;
178 htp.anchor('javascript:set_icon('''||p_packproc||l_parameter||''')', htf.img(curl => '/OA_MEDIA/FNDINEXT.gif', calt => icx_util.replace_alt_quotes(l_prompts(3)),
179 cattributes => 'width=22 height=22 BORDER=0'),'',' onMouseOver="window.status='''||icx_util.replace_OnMouseOver_quotes(l_message)||''';return true"');
180 else
181 htp.anchor('javascript:'||p_jsproc||'('''||to_char(p_stop_row+1)||''','''||to_char(l_stop_row)||''')',
182 htf.img(curl => '/OA_MEDIA/FNDINEXT.gif', calt => icx_util.replace_alt_quotes(l_prompts(3)),
183 cattributes => 'width=22 height=22 BORDER=0'),'',' onMouseOver="window.status='''||icx_util.replace_OnMouseOver_quotes(l_message)||''';return true"');
184 end if;
185 htp.p('</TD>');
186 htp.p('<TD>');
187 htp.p('</TD>');
188
189 fnd_message.set_name('ICX','ICX_TABLE_SET');
190 fnd_message.set_token('FROM_ROW_TOKEN',p_row_count-p_query_set+1);
191 fnd_message.set_token('TO_ROW_TOKEN',p_row_count);
192 l_message := fnd_message.get;
193
194 htp.p('<TD>');
195 if p_jsproc is null then
196 l_parameter := '?p_start_row='||to_char(p_row_count-p_query_set+1)||'&'||'p_end_row='||to_char(p_row_count)||'&'||'p_where='||p_encrypted_where;
197 if p_hidden is not null
198 then
199 l_parameter := l_parameter||'&'||'p_hidden='||p_hidden;
200 end if;
201 htp.anchor('javascript:set_icon('''||p_packproc||l_parameter||''')',
202 htf.img(curl => '/OA_MEDIA/FNDILAST.gif', calt => icx_util.replace_alt_quotes(l_prompts(4)),
203 cattributes => 'width=22 height=22 BORDER=0'),'','onMouseOver="window.status='''||icx_util.replace_OnMouseOver_quotes(l_message)||''';return true"');
204 else
205 htp.anchor('javascript:'||p_jsproc||'('''||to_char(p_row_count-p_query_set+1)||''','''||to_char(p_row_count)||''')',
206 htf.img(curl => '/OA_MEDIA/FNDILAST.gif', calt => icx_util.replace_alt_quotes(l_prompts(4)),
207 cattributes => 'width=22 height=22 BORDER=0'),'',' onMouseOver="window.status='''||icx_util.replace_OnMouseOver_quotes(l_message)||''';return true"');
208 end if;
209 htp.p('</TD>');
210 end if;
211 htp.p('<TD ALIGN="RIGHT" WIDTH="100%"></TD>');
212
213 if (p_start_row = 1 and p_stop_row = p_row_count)
214 then
215 l_title := '';
216 else
217 fnd_message.set_name('ICX','ICX_RECORDS_ALL');
218 fnd_message.set_token('TOTAL_ROW_TOKEN',p_row_count);
219 l_message := fnd_message.get;
220
221 htp.p('<TD ALIGN="RIGHT" WIDTH="100%">');
222 if p_jsproc is null then
223 l_parameter := '?p_start_row='||1||'&'||'p_end_row='||to_char(p_row_count)||'&'||'p_where='||p_encrypted_where;
224 if p_hidden is not null
225 then
226 l_parameter := l_parameter||'&'||'p_hidden='||p_hidden;
227 end if;
228 icx_util.DynamicButton(P_ButtonText => l_message,
229 P_ImageFileName => 'FNDBALL',
230 P_OnMouseOverText => l_message,
231 P_HyperTextCall => 'javascript:set_icon('''||p_packproc||l_parameter||''')',
232 P_LanguageCode => p_language_code,
233 P_JavaScriptFlag => FALSE);
234 else
235 icx_util.DynamicButton(P_ButtonText => l_message,
236 P_ImageFileName => 'FNDBALL',
237 P_OnMouseOverText => l_message,
238 P_HyperTextCall => 'javascript:'||p_jsproc||'(''1'','''||to_char(p_row_count)||''')',
239 P_LanguageCode => p_language_code,
240 P_JavaScriptFlag => FALSE);
241 end if;
242 htp.p('</TD>');
243 end if;
244
245 htp.tableRowClose;
246 htp.tableClose;
247
248 end;
249
250 procedure printText( p_item_rec in ak_query_pkg.item_rec,
251 p_data_type in varchar2,
252 p_value in varchar2,
253 p_rowid in rowid,
254 p_goto in varchar2,
255 p_session_id in number,
256 p_region_style in varchar2,
257 p_data_background_color in varchar2,
258 p_rowspan in number) is
259
260
261 l_Y varchar2(2000);
262 l_input_check varchar2(2000);
263 l_display_value varchar2(5000);
264 l_data_background_color varchar2(30);
265
266 begin
267
268 if p_region_style = 'FORM'
269 then
270 l_display_value := icx_on_utilities.formatText(p_value,'Y',p_item_rec.italic);
271 l_data_background_color := ' bgcolor="#'||p_data_background_color||'"';
272 else
273 l_display_value := icx_on_utilities.formatText(p_value,p_item_rec.bold,p_item_rec.italic);
274 l_data_background_color := '';
275 end if;
276
277 -- nlbarlow disable ON form support
278 if p_item_rec.update_flag = 'X'
279 then
280 l_input_check := '';
281 if p_item_rec.required_flag = 'Y'
282 then
283 l_input_check := l_input_check||'null_alert(this.value,'''||p_item_rec.attribute_label_long||''');';
284 end if;
285
286 if p_data_type = 'NUMBER'
287 then
288 l_input_check := l_input_check||'check_number(this);';
289 end if;
290 htp.tableData(cvalue => htf.formText(cname => 't', csize => p_item_rec.display_value_length, cvalue => p_value, cattributes => 'onChange="'||l_input_check||'"'), crowspan => p_rowspan);
291 elsif p_rowid is not null and p_value is not null
292 then
293 l_Y := 'X*****1****'||p_rowid||'*'||p_goto;
294 htp.tableData(cvalue => '<A HREF="'||icx_cabo.g_plsql_agent||'OracleON.IC?Y='||icx_call.encrypt2(l_Y,p_session_id)||'" TARGET="_self">'
295 ||l_display_value, calign => p_item_rec.horizontal_alignment, cattributes => 'VALIGN="'||p_item_rec.vertical_alignment||'"'||l_data_background_color, crowspan => p_rowspan);
296 else
297 htp.tableData(cvalue => l_display_value, calign => p_item_rec.horizontal_alignment, cattributes => 'VALIGN="'||p_item_rec.vertical_alignment||'"'||l_data_background_color, crowspan => p_rowspan);
298 end if;
299
300 end;
301
302 procedure printSpinboxup( p_update_flag in varchar2,
303 p_required_flag in varchar2,
304 p_label in varchar2,
305 p_data_type in varchar2,
306 p_value in varchar2,
307 p_value_length in number,
308 p_bold in varchar2,
309 p_italic in varchar2,
310 p_halign in varchar2,
311 p_valign in varchar2,
312 p_element in varchar2,
313 p_language_code in varchar2,
314 p_rowspan in number) is
315
316 l_input_check varchar2(2000);
317
318 begin
319
320 l_input_check := '';
321 if p_required_flag = 'Y'
322 then
323 l_input_check := l_input_check||'null_alert(this.value,'''||p_label||''');';
324 end if;
325
326 -- nlbarlow disable ON form support
327 if p_update_flag = 'X'
328 then
329 if p_data_type = 'NUMBER'
330 then
331 l_input_check := l_input_check||'check_number(this);';
332 htp.tableData(cvalue => htf.formText(cname => 't', csize => p_value_length, cvalue => p_value, cattributes => 'onChange="'||l_input_check||'"'), crowspan => p_rowspan);
333 htp.tableData(cvalue => '<A HREF="javascript:spin_up('||p_element||')" onMouseOver="return true"><IMG SRC="/OA_MEDIA/FNDISPNU.gif" ALIGN="CENTER" BORDER=NO WIDTH=18 HEIGHT=20>');
334 else
335 htp.tableData(cvalue => htf.formText(cname => 't', csize => p_value_length, cvalue => p_value, cattributes => 'onChange="'||l_input_check||'"'), crowspan => p_rowspan);
336 end if;
337 else
338 htp.tableData(cvalue => icx_on_utilities.formatText(p_value,p_bold,p_italic), calign => p_halign, cattributes => 'VALIGN="'||p_valign||'"', crowspan => p_rowspan);
339 end if;
340
341 end;
342
343 procedure printSpinboxdown( p_update_flag in varchar2,
344 p_data_type in varchar2,
345 p_element in varchar2,
346 p_language_code in varchar2) is
347 begin
348
349 -- nlbarlow disable ON form support
350 if p_update_flag = 'X'
351 then
352 if p_data_type = 'NUMBER'
353 then
354 htp.tableData(cvalue => '<A HREF="javascript:spin_down('||p_element||')" onMouseOver="return true"><IMG SRC="/OA_MEDIA/FNDISPND.gif" ALIGN="CENTER" BORDER=NO WIDTH=18 HEIGHT=20>');
355 end if;
356 end if;
357
358 end;
359
360 procedure printButton( p_item_rec in ak_query_pkg.item_rec,
361 p_rowid in rowid,
362 p_goto in varchar2,
363 p_session_id in number,
364 p_rowspan in number,
365 p_region_style in varchar2) is
366
367 l_Y varchar2(2000);
368
369 begin
370
371 if p_rowid is null
372 then
373 htp.tableData('No link defined');
374 elsif p_region_style = 'FORM'
375 then
376 l_Y := 'X*****1****'||p_rowid||'*'||p_goto;
377 htp.tableData(cvalue => '<INPUT type="button" value="'||icx_util.replace_alt_quotes(p_item_rec.attribute_label_long)
378 ||'" onClick="goto_button('''||icx_cabo.g_plsql_agent||'OracleON.IC?Y='||icx_call.encrypt2(l_Y,p_session_id)||''')">', calign => p_item_rec.horizontal_alignment, cattributes => 'VALIGN="'||p_item_rec.vertical_alignment||'"',
379 crowspan => p_rowspan, ccolspan => '3');
380 else
381 l_Y := 'X*****1****'||p_rowid||'*'||p_goto;
382 htp.tableData(cvalue => '<INPUT type="button" value="'||icx_util.replace_alt_quotes(p_item_rec.attribute_label_long)
383 ||'" onClick="goto_button('''||icx_cabo.g_plsql_agent||'OracleON.IC?Y='||icx_call.encrypt2(l_Y,p_session_id)||''')">', calign => p_item_rec.horizontal_alignment, cattributes => 'VALIGN="'||p_item_rec.vertical_alignment||'"', crowspan => p_rowspan);
384 end if;
385
386 end;
387
388 procedure printCheckbox(p_update_flag in varchar2,
389 p_value_id in number,
390 p_value in varchar2,
391 p_halign in varchar2,
392 p_valign in varchar2,
393 p_language_code in varchar2,
394 p_rowspan in number,
395 p_label in varchar2) is
396
397 begin
398
399 -- nlbarlow disable ON form support
400 if p_update_flag = 'X'
401 then
402 if p_value_id is null
403 then
404 htp.tableData(cvalue => htf.formCheckbox('c','F')||p_label, crowspan => p_rowspan);
405 else
406 if p_value = 'T' or p_value = 'Y'
407 then
408 htp.tableData(cvalue => htf.formCheckbox('c',p_value,'CHECKED')||p_label, crowspan => p_rowspan);
409 else
410 htp.tableData(cvalue => htf.formCheckbox('c',p_value)||p_label, crowspan => p_rowspan);
411 end if;
412 end if;
413 else
414 if p_value_id is null
415 then
416 htp.tableData(cvalue => '', crowspan => p_rowspan);
417 else
418 if p_value = 'T' or p_value = 'Y'
419 then
420 htp.tableData(cvalue => '<img src="/OA_MEDIA/FNDICHEK.gif" ALT="'||p_value||'" border=0 width=17 height=16>', calign => p_halign, cattributes => 'VALIGN="'||p_valign||'"', crowspan => p_rowspan);
421 else
422 htp.tableData(cvalue => '', crowspan => p_rowspan);
423 end if;
424 end if;
425 end if;
426
427 end;
428
429 procedure printImage( p_item_rec in ak_query_pkg.item_rec,
430 p_value in varchar2,
431 p_rowid in rowid,
432 p_goto in varchar2,
433 p_session_id in number,
434 p_language_code in varchar2,
435 p_rowspan in number) is
436
437
438 l_Y varchar2(2000);
439 l_input_check varchar2(2000);
440
441 begin
442
443 if p_item_rec.region_validation_api_pkg is not null
444 then
445 htp.tableData(cvalue => '<A HREF="'||icx_cabo.g_plsql_agent||p_item_rec.region_validation_api_pkg||'.'||p_item_rec.region_validation_api_proc||'">
446 ||<IMG SRC="/OA_MEDIA/'||p_item_rec.icx_custom_call||'" ALT="'||p_item_rec.attribute_label_long||'" ALIGN="CENTER" BORDER=NO TARGET="_top">');
447
448 elsif p_rowid is not null
449 then
450 htp.tableData(cvalue => '<A HREF="'||icx_cabo.g_plsql_agent||'OracleON.IC?Y='||icx_call.encrypt2(l_Y,p_session_id)||'">
451 ||<IMG SRC="/OA_MEDIA/'||p_item_rec.icx_custom_call||'" ALT="'||p_item_rec.attribute_label_long||'" ALIGN="CENTER" BORDER=NO>');
452
453 else
454 htp.tableData('<IMG SRC="/OA_MEDIA/'||p_item_rec.icx_custom_call||'" ALT="'||p_item_rec.attribute_label_long||'" ALIGN="CENTER" BORDER=NO>');
455
456 end if;
457
458 end;
459
460 procedure printPoplist( p_region_application_id in number,
461 p_region_code in varchar2,
462 p_update_flag in varchar2,
463 p_value_id in number,
464 p_value in varchar2,
465 p_bold in varchar2,
466 p_italic in varchar2,
467 p_halign in varchar2,
468 p_valign in varchar2,
469 p_rowspan in number) is
470
471 l_poplist varchar2(2000);
472
473 l_responsibility_id number;
474 l_user_id number;
475
476 begin
477
478 if p_region_code is not null
479 then
480 -- nlbarlow disable ON form support
481 if p_update_flag = 'X'
482 then
483
484 l_responsibility_id := icx_sec.getID(icx_sec.PV_RESPONSIBILITY_ID);
485 l_user_id := icx_sec.getID(icx_sec.PV_WEB_USER_ID);
486
487 ak_query_pkg.exec_query('','','','',p_region_application_id,p_region_code,'','','','','','','','','','','','','','','',l_responsibility_id,l_user_id,'T','F','F','F');
488
489 -- icx_on_utilities2.printPLSQLtables;
490
491 if p_value_id is null
492 then
493
494 l_poplist := htf.formSelectOpen('s');
495 for r in ak_query_pkg.g_results_table.FIRST..ak_query_pkg.g_results_table.LAST loop
496 l_poplist := l_poplist||('<OPTION VALUE="'||ak_query_pkg.g_results_table(r).value2||'">'||ak_query_pkg.g_results_table(r).value1);
497 end loop;
498 l_poplist := l_poplist||htf.formSelectClose;
499
500 htp.tableData(cvalue => l_poplist, crowspan => p_rowspan);
501
502 else
503
504 l_poplist := htf.formSelectOpen('s');
505 for r in ak_query_pkg.g_results_table.FIRST..ak_query_pkg.g_results_table.LAST loop
506 if ak_query_pkg.g_results_table(r).value2 = p_value
507 then
508 l_poplist := l_poplist||('<OPTION SELECTED VALUE="'||ak_query_pkg.g_results_table(r).value2||'">'||ak_query_pkg.g_results_table(r).value1);
509 else
510 l_poplist := l_poplist||('<OPTION VALUE="'||ak_query_pkg.g_results_table(r).value2||'">'||ak_query_pkg.g_results_table(r).value1);
511 end if;
512 end loop;
513 l_poplist := l_poplist||htf.formSelectClose;
514
515 end if;
516
517 htp.tableData(cvalue => l_poplist, crowspan => p_rowspan);
518
519 else
520
521 htp.tableData(cvalue => icx_on_utilities.formatText(p_value,p_bold,p_italic), calign => p_halign, cattributes => 'VALIGN="'||p_valign||'"', crowspan => p_rowspan);
522
523 end if;
524 else
525
526 htp.tableData(cvalue => icx_on_utilities.formatText(p_value,p_bold,p_italic), calign => p_halign, cattributes => 'VALIGN="'||p_valign||'"', crowspan => p_rowspan);
527
528 end if;
529
530 end;
531
532 procedure displayRegion(p_region_rec_id in number) is
533
534 l_flow_appl_id number;
535 l_flow_code varchar2(30);
536 l_page_appl_id number;
537 l_page_code varchar2(30);
538 l_region_appl_id number;
539 l_region_code varchar2(30);
540 l_start number;
541 l_end number;
542 l_start_region varchar2(30);
543
544 l_region_name varchar2(80);
545 l_region_style varchar2(30);
546 l_num_columns number;
547 l_total_result_count number;
548
549 l_region_items_start number;
550 l_region_items_end number;
551 l_region_results_start number;
552 l_region_results_end number;
553 l_attribute_appl_id number;
554 l_attribute_code varchar2(30);
555
556 l_results_start number;
557 l_results_end number;
558
559 l_query_set number;
560 l_query_set2 number;
561 l_start_row number;
562 l_stop_row number;
563 l_language_code varchar2(30);
564 l_session_id number;
565 l_header_color varchar2(30);
566 l_header_text_color varchar2(30);
567 l_data_multirow_color varchar2(30);
568 l_data_singlerow_color varchar2(30);
569
570 l_display_sequences icx_on_utilities.number_table;
571 l_update_counts icx_on_utilities.number_table;
572 l_value_id icx_on_utilities.number_table;
573 l_item_styles icx_on_utilities.v30_table;
574 l_data_types icx_on_utilities.v30_table;
575 l_rowids icx_on_utilities.rowid_table;
576 l_url_display_sequence icx_on_utilities.number_table;
577 -- l_uk_column_tab ak_query_pkg.rel_key_tab;
578
579 l_continue boolean;
580 l_update boolean;
581 l_rowspan number;
582 l_update_count number;
583 l_update_total number;
584 l_row_count number;
585 l_display_count number;
586 l_counter number;
587 l_values icx_util.char4000_table;
588 l_goto varchar2(2000);
589 l_table_row varchar2(2000);
590 l_table_rows icx_on_utilities.v2000_table;
591 l_X varchar2(2000);
592 l_Y varchar2(2000);
593 l_message varchar2(2000);
594 l_submit_string varchar2(2000);
595 l_input_check varchar2(2000);
596 l_attribute_codes varchar2(2000);
597 p_result_values varchar2(2000);
598 l_value varchar2(4000);
599 l_procedure_call varchar2(2000);
600 l_call integer;
601 l_dummy integer;
602
603 l_status varchar2(240);
604 l_title varchar2(80);
605 l_prompts icx_util.g_prompts_table;
606
607 c_browser varchar2(400):=owa_util.get_cgi_env('HTTP_USER_AGENT');
608
609 cursor links is
610 select b.ROWID L_ROWID
611 from AK_FLOW_REGION_RELATIONS b,
612 AK_FLOW_PAGE_REGION_ITEMS a
613 where a.ATTRIBUTE_CODE = l_attribute_code
614 and a.ATTRIBUTE_APPLICATION_ID = l_attribute_appl_id
615 and a.REGION_CODE = l_region_code
616 and a.REGION_APPLICATION_ID = l_region_appl_id
617 and a.PAGE_CODE = l_page_code
618 and a.PAGE_APPLICATION_ID = l_page_appl_id
619 and a.FLOW_CODE = l_flow_code
620 and a.FLOW_APPLICATION_ID = l_flow_appl_id
621 and a.REGION_CODE = b.FROM_REGION_CODE
622 and a.REGION_APPLICATION_ID = b.FROM_REGION_APPL_ID
623 and a.PAGE_CODE = b.FROM_PAGE_CODE
624 and a.PAGE_APPLICATION_ID = b.FROM_PAGE_APPL_ID
625 and a.FLOW_CODE = b.FLOW_CODE
626 and a.FLOW_APPLICATION_ID = b.FLOW_APPLICATION_ID
627 and a.TO_PAGE_CODE = b.TO_PAGE_CODE
628 and a.TO_PAGE_APPL_ID = b.TO_PAGE_APPL_ID;
629
630 cursor urls is
631 select a.DISPLAY_SEQUENCE
632 from AK_REGION_ITEMS a,
633 AK_FLOW_PAGE_REGION_ITEMS b
634 where b.ATTRIBUTE_CODE = l_attribute_code
635 and b.ATTRIBUTE_APPLICATION_ID = l_attribute_appl_id
636 and b.TO_URL_ATTRIBUTE_CODE is not null
637 and b.TO_URL_ATTRIBUTE_APPL_ID is not null
638 and b.REGION_CODE = l_region_code
639 and b.REGION_APPLICATION_ID = l_region_appl_id
640 and b.PAGE_CODE = l_page_code
641 and b.PAGE_APPLICATION_ID = l_page_appl_id
642 and b.FLOW_CODE = l_flow_code
643 and b.FLOW_APPLICATION_ID = l_flow_appl_id
644 and b.REGION_CODE = a.REGION_CODE
645 and b.REGION_APPLICATION_ID = a.REGION_APPLICATION_ID
646 and b.TO_URL_ATTRIBUTE_CODE = a.ATTRIBUTE_CODE
647 and b.TO_URL_ATTRIBUTE_APPL_ID = a.ATTRIBUTE_APPLICATION_ID;
648 begin
649
650 l_flow_appl_id := ak_query_pkg.g_regions_table(p_region_rec_id).flow_application_id;
651 l_flow_code := ak_query_pkg.g_regions_table(p_region_rec_id).flow_code;
652 l_page_appl_id := ak_query_pkg.g_regions_table(p_region_rec_id).page_application_id;
653 l_page_code := ak_query_pkg.g_regions_table(p_region_rec_id).page_code;
654 l_region_appl_id := ak_query_pkg.g_regions_table(p_region_rec_id).region_application_id;
655 l_region_code := ak_query_pkg.g_regions_table(p_region_rec_id).region_code;
656 l_region_name := ak_query_pkg.g_regions_table(p_region_rec_id).name;
657 l_region_style := ak_query_pkg.g_regions_table(p_region_rec_id).region_style;
658 l_num_columns := nvl(ak_query_pkg.g_regions_table(p_region_rec_id).number_of_format_columns,2);
659 l_total_result_count := ak_query_pkg.g_regions_table(p_region_rec_id).total_result_count;
660
661 l_region_items_start := -1;
662 l_region_items_end := 0;
663
664 for i in 0..(ak_query_pkg.g_items_table.COUNT - 1) loop
665 if ak_query_pkg.g_items_table(i).region_rec_id = p_region_rec_id
666 then
667 if l_region_items_start < 0
668 then
669 l_region_items_start := i;
670 end if;
671 l_region_items_end := i;
672 end if;
673 end loop; -- ak_query_pkg.g_items_table
674
675 l_region_results_start := -1;
676 l_region_results_end := 0;
677
678 for i in 0..(ak_query_pkg.g_results_table.COUNT - 1) loop
679 if ak_query_pkg.g_results_table(i).region_rec_id = p_region_rec_id
680 then
681 if l_region_results_start < 0
682 then
683 l_region_results_start := i;
684 end if;
685 l_region_results_end := i;
686 end if;
687 end loop; -- p_result_table
688
689 if l_region_items_start >= 0 and l_region_results_start >= 0
690 then
691
692 l_start := icx_on_utilities.g_on_parameters(6);
693 l_end := icx_on_utilities.g_on_parameters(7);
694 l_start_region := icx_on_utilities.g_on_parameters(8);
695 l_language_code := icx_sec.getID(icx_sec.pv_language_code);
696 l_session_id := icx_sec.getID(icx_sec.pv_session_id);
697
698 for i in l_region_items_start..l_region_items_end loop
699 l_display_sequences(ak_query_pkg.g_items_table(i).display_sequence) := i;
700 end loop;
701
702 l_update := FALSE;
703 l_rowspan := 1;
704 l_update_count := 0;
705 l_X := '';
706
707 for i in l_region_items_start..l_region_items_end loop
708 -- nlbarlow disable ON form support
709 if ak_query_pkg.g_items_table(i).update_flag = 'X'
710 then
711 l_update := TRUE;
712 l_update_count := l_update_count + 1;
713 l_X := l_X||ak_query_pkg.g_items_table(i).attribute_code||'*';
714 end if;
715 if ak_query_pkg.g_items_table(i).attribute_label_length = 0
716 then
717 ak_query_pkg.g_items_table(i).attribute_label_long := '<BR>';
718 end if;
719 l_value_id(i) := ak_query_pkg.g_items_table(i).value_id;
720 l_item_styles(i) := ak_query_pkg.g_items_table(i).item_style;
721 if l_item_styles(i) = 'HIDDEN'
722 then
723 l_update_count := l_update_count + 1;
724 l_X := l_X||ak_query_pkg.g_items_table(i).attribute_code||'*';
725 elsif l_item_styles(i) = 'SPINBOX'
726 then
727 l_rowspan := 2;
728 l_update_counts(i) := l_update_count;
729 end if;
730 l_attribute_appl_id := ak_query_pkg.g_items_table(i).attribute_application_id;
731 l_attribute_code := ak_query_pkg.g_items_table(i).attribute_code;
732 l_attribute_codes := l_attribute_codes||ak_query_pkg.g_items_table(i).attribute_code||'*';
733 select DATA_TYPE
734 into l_data_types(i)
735 from AK_ATTRIBUTES
736 where ATTRIBUTE_APPLICATION_ID = l_attribute_appl_id
737 and ATTRIBUTE_CODE = l_attribute_code;
738
739 l_ROWIDS(I) := '';
740 l_url_display_sequence(i) := '';
741
742 for l in links loop
743 if l_item_styles(i) = 'BUTTON'
744 then
745 l_rowids(i) := l.L_ROWID;
746 else
747 l_rowids(i) := l.L_ROWID;
748 end if;
749 end loop; -- links
750
751 for u in urls loop
752 l_item_styles(i) := 'URL';
753 l_url_display_sequence(i) := l_display_sequences(u.DISPLAY_SEQUENCE);
754 end loop; -- urls
755
756 if ak_query_pkg.g_items_table(i).region_defaulting_api_pkg is not null
757 then
758 l_item_styles(i) := 'DEFAULT_PKG';
759 end if;
760
761 -- htp.p('DEBUG '||i||' '||ak_query_pkg.g_items_table(i).attribute_label_long||' '||l_attribute_code||' '||l_item_styles(i)||' '||l_url_display_sequence(i));htp.nl;
762
763 end loop; -- region_items
764
765 l_attribute_codes := l_attribute_codes||']';
766 l_update_total := l_update_count;
767
768 if l_update
769 then
770 htp.p('<SCRIPT LANGUAGE="JavaScript">');
771 htp.p('<!-- Hide from old browsers');
772
773 js.checkNumber;
774
775 htp.p('function check_number(field) {
776 if (!checkNumber(field)) {
777 field.focus();
778 field.value = "";
779 }
780 }');
781
782 js.null_alert;
783
784 htp.p('function spin_up(element_ind) {
785 if (document.inputForm'||p_region_rec_id||'.elements[element_ind].value == "") {
786 document.inputForm'||p_region_rec_id||'.elements[element_ind].value = 1
787 }
788 else {
789 document.inputForm'||p_region_rec_id||'.elements[element_ind].value++
790 }
791 }');
792
793 htp.p('function spin_down(element_ind) {
794 if (document.inputForm'||p_region_rec_id||'.elements[element_ind].value != "") {
795 if (document.inputForm'||p_region_rec_id||'.elements[element_ind].value >= 1) {
796 document.inputForm'||p_region_rec_id||'.elements[element_ind].value--
797 }
798 else {
799 document.inputForm'||p_region_rec_id||'.elements[element_ind].value = ""
800 }
801 }
802 }');
803
804 if icx_on_utilities.g_on_parameters(1) = 'W'
805 then
806 l_Y := icx_on_utilities.g_on_parameters(1)||'*'||icx_on_utilities.g_on_parameters(2)||'*'||icx_on_utilities.g_on_parameters(3)||'*'||icx_on_utilities.g_on_parameters(4)||'*'||icx_on_utilities.g_on_parameters(5)
807 ||'*'||icx_call.decrypt2(icx_on_utilities.g_on_parameters(9))||'**]';
808 else
809 l_Y := icx_on_utilities.g_on_parameters(1)||'*'||icx_on_utilities.g_on_parameters(2)||'*'||icx_on_utilities.g_on_parameters(3)||'*'||icx_on_utilities.g_on_parameters(4)||'*'||icx_on_utilities.g_on_parameters(5)
810 ||'*'||icx_on_utilities.g_on_parameters(6)||'*'||icx_on_utilities.g_on_parameters(7)||'*'||icx_on_utilities.g_on_parameters(8)||'*'||icx_on_utilities.g_on_parameters(9)||'*'||icx_on_utilities.g_on_parameters(10)
811 ||'*'||icx_on_utilities.g_on_parameters(11)||'*'||icx_on_utilities.g_on_parameters(12)||'*'||icx_on_utilities.g_on_parameters(13)||'*'||icx_on_utilities.g_on_parameters(14)||'*'||icx_on_utilities.g_on_parameters(15)
812 ||'*'||icx_on_utilities.g_on_parameters(16)||'*'||icx_on_utilities.g_on_parameters(17)||'*'||icx_on_utilities.g_on_parameters(18)||'*'||icx_on_utilities.g_on_parameters(19)||'*'||icx_on_utilities.g_on_parameters(20)
813 ||'*'||icx_on_utilities.g_on_parameters(21)||'**]';
814 end if;
815
816 l_X := icx_call.encrypt2(l_X||']');
817 l_Y := icx_call.encrypt2(l_Y);
818
819 htp.p('function submitFunction() {
820 var Z = "";
821 for (i=0; i < document.inputForm'||p_region_rec_id||'.elements.length; i++) {
822 if (document.inputForm'||p_region_rec_id||'.elements[i].name == "c")
823 Z = Z + document.inputForm'||p_region_rec_id||'.elements[i].checked + "*";
824 else
825 if (document.inputForm'||p_region_rec_id||'.elements[i].name == "s")
826 Z = Z + document.inputForm'||p_region_rec_id||'.elements[i].options[document.inputForm'||p_region_rec_id||'.elements[i].selectedIndex].value + "*";
827 else
828 Z = Z + document.inputForm'||p_region_rec_id||'.elements[i].value + "*";
829 };
830 document.submitForm.Z.value = Z + "]";
831 document.submitForm.submit();
832 }');
833
834 htp.p('function resetFunction() {
835 document.inputForm'||p_region_rec_id||'.reset();
836 }');
837
838 htp.p('// -->');
839 htp.p('</SCRIPT>');
840
841 htp.formOpen(curl => icx_cabo.g_plsql_agent||ak_query_pkg.g_regions_table(p_region_rec_id).region_validation_api_pkg||'.'||ak_query_pkg.g_regions_table(p_region_rec_id).region_validation_api_proc, cattributes => 'NAME="submitForm"');
842 htp.formHidden('X',l_X);
843 htp.formHidden('Y',l_Y);
844 htp.formHidden('Z');
845 htp.formClose;
846 end if;
847
848 htp.formOpen(curl => 'javascript:submitFunction()', cattributes => 'NAME="inputForm'||p_region_rec_id||'"');
849
850 if l_region_style = 'TABLE'
851 then
852
853 l_header_color := icx_util.get_color('TABLE_HEADER');
854 l_header_text_color := icx_util.get_color('TABLE_HEADER_TEXT');
855 l_data_multirow_color := icx_util.get_color('TABLE_DATA_MULTIROW');
856
857 select QUERY_SET
858 into l_query_set
859 from ICX_PARAMETERS;
860
861 if l_end is null
862 then
863 if l_query_set > l_region_results_end - l_region_results_start
864 then
865 l_query_set2 := l_region_results_end - l_region_results_start + 1;
866 else
867 l_query_set2 := l_query_set;
868 end if;
869 else
870 l_query_set2 := l_end - l_start + 1;
871 end if;
872
873 if l_start_region = l_region_code
874 then
875 if l_start < 1 or l_start is null
876 then
877 l_start_row := 1;
878 else
879 l_start_row := l_start;
880 end if;
881 else
882 l_start_row := 1;
883 end if;
884 l_stop_row := l_start_row+l_query_set2-1;
885 if l_region_results_end - l_region_results_start <> l_stop_row - l_start_row
886 then
887 -- nlbarlow 2334932, added conditon to prevent row over run
888 if l_region_results_start + l_stop_row - 1 <= l_region_results_end
889 then
890 l_region_results_end := l_region_results_start + l_stop_row - 1;
891 end if;
892 l_region_results_start := l_region_results_start + l_start_row - 1;
893 end if;
894
895 l_Y := icx_on_utilities.g_on_parameters(1)||'*'||icx_on_utilities.g_on_parameters(2)||'*'||icx_on_utilities.g_on_parameters(3)||'*'||icx_on_utilities.g_on_parameters(4)||'*'||icx_on_utilities.g_on_parameters(5)
896 ||'*'||icx_on_utilities.g_on_parameters(6)||'*'||icx_on_utilities.g_on_parameters(7)||'*'||l_region_code||'*'||'*'||icx_on_utilities.g_on_parameters(10)
897 ||'*'||icx_on_utilities.g_on_parameters(11)||'*'||icx_on_utilities.g_on_parameters(12)||'*'||icx_on_utilities.g_on_parameters(13)||'*'||icx_on_utilities.g_on_parameters(14)||'*'||icx_on_utilities.g_on_parameters(15)
898 ||'*'||icx_on_utilities.g_on_parameters(16)||'*'||icx_on_utilities.g_on_parameters(17)||'*'||icx_on_utilities.g_on_parameters(18)||'*'||icx_on_utilities.g_on_parameters(19)||'*'||icx_on_utilities.g_on_parameters(20)
899 ||'*'||icx_on_utilities.g_on_parameters(21)||'**]';
900
901 if l_total_result_count > 5
902 then
903
904 icx_on_utilities2.displaySetIcons(l_language_code,icx_cabo.g_plsql_agent||'OracleON.IC',l_start_row,l_stop_row,icx_on_utilities.g_on_parameters(9),l_query_set,l_total_result_count,TRUE,'',icx_call.encrypt2(l_Y),l_update);
905
906 end if;
907
908 htp.tableOpen(cborder => 'BORDER=2', cattributes => 'CELLPADDING=2');
909 htp.p('<TR BGColor="#'||l_header_color||'">');
910 for i in l_region_items_start..l_region_items_end loop
911 if ak_query_pkg.g_items_table(i).node_display_flag = 'Y'
912 and ak_query_pkg.g_items_table(i).secured_column = 'F'
913 then
914 if l_item_styles(i) = 'BUTTON'
915 then
916 htp.tableData(cvalue => '<font color="#'||l_header_text_color||'"><BR>');
917 elsif l_item_styles(i) = 'HIDDEN'
918 then
919 l_title := '';
920 elsif l_item_styles(i) = 'SPINBOX' and l_data_types(i) = 'NUMBER'
921 then
922 htp.tableData(cvalue => '<font color="#'||l_header_text_color||'"><B>'||ak_query_pkg.g_items_table(i).attribute_label_long||'</B>', calign => 'CENTER', ccolspan => 2);
923 else
924 htp.tableData('<font color="#'||l_header_text_color||'"><B>'||ak_query_pkg.g_items_table(i).attribute_label_long||'</B>', calign => 'CENTER');
925 end if;
926 end if;
927 end loop; -- region_items
928 htp.tableRowClose;
929 htp.tableRowOpen;
930 htp.tableRowClose;
931 htp.tableRowOpen;
932 htp.tableRowClose;
933
934 l_row_count := 0;
935
936 for r in l_region_results_start..l_region_results_end loop
937
938 l_row_count := l_row_count + 1;
939
940 icx_util.transfer_Row_To_Column(ak_query_pkg.g_results_table(r),l_values);
941
942 -- ak_query_pkg.get_uk_columns(ak_query_pkg.g_regions_table(p_region_rec_id).primary_key_name, l_uk_column_tab);
943 l_goto := ak_query_pkg.g_regions_table(p_region_rec_id).primary_key_name
944 ||'*'||ak_query_pkg.g_results_table(r).key1
945 ||'*'||ak_query_pkg.g_results_table(r).key2
946 ||'*'||ak_query_pkg.g_results_table(r).key3
947 ||'*'||ak_query_pkg.g_results_table(r).key4
948 ||'*'||ak_query_pkg.g_results_table(r).key5
949 ||'*'||ak_query_pkg.g_results_table(r).key6
950 ||'*'||ak_query_pkg.g_results_table(r).key7
951 ||'*'||ak_query_pkg.g_results_table(r).key8
952 ||'*'||ak_query_pkg.g_results_table(r).key9
953 ||'*'||ak_query_pkg.g_results_table(r).key10||'**]';
954
955 htp.p('<TR BGColor="#'||l_data_multirow_color||'">');
956
957 for i in l_region_items_start..l_region_items_end loop
958
959 if ak_query_pkg.g_items_table(i).node_display_flag = 'Y'
960 and ak_query_pkg.g_items_table(i).secured_column = 'F'
961 then
962 -- htp.p('DEBUG '||i||' '||l_value_id(i)||' '||l_secured_column(i)||' '||l_node_display_flag(i)||' '||ak_query_pkg.g_items_table(i).attribute_label_long||' '||l_item_styles(i)||' '||l_url_display_sequence(i));htp.nl;
963
964 if ak_query_pkg.g_items_table(i).value_id is null
965 then
966 l_value := ak_query_pkg.g_items_table(i).attribute_label_long;
967 else
968 l_value := l_values(ak_query_pkg.g_items_table(i).value_id);
969 end if;
970
971 if l_item_styles(i) = 'TEXT'
972 then
973
974 printText( ak_query_pkg.g_items_table(i),
975 l_data_types(i),
976 l_value,
977 l_rowids(i),
978 l_goto,
979 l_session_id,
980 l_region_style,
981 '',
982 l_rowspan);
983
984 elsif l_item_styles(i) = 'SPINBOX'
985 then
986
987 printSpinboxup( ak_query_pkg.g_items_table(i).update_flag,
988 ak_query_pkg.g_items_table(i).required_flag,
989 ak_query_pkg.g_items_table(i).attribute_label_long,
990 l_data_types(i),
991 l_value,
992 ak_query_pkg.g_items_table(i).display_value_length,
993 ak_query_pkg.g_items_table(i).bold,
994 ak_query_pkg.g_items_table(i).italic,
995 ak_query_pkg.g_items_table(i).horizontal_alignment,
996 ak_query_pkg.g_items_table(i).vertical_alignment,
997 to_char((l_row_count-1)*l_update_total+l_update_counts(i)-1),
998 l_language_code,
999 l_rowspan);
1000
1001 elsif l_item_styles(i) = 'BUTTON'
1002 then
1003 printButton( ak_query_pkg.g_items_table(i),
1004 l_rowids(i),
1005 l_goto,
1006 l_session_id,
1007 l_rowspan,
1008 l_region_style);
1009
1010 elsif l_item_styles(i) = 'HIDDEN'
1011 then
1012 htp.formHidden('h',l_value);
1013 elsif l_item_styles(i) = 'CHECKBOX'
1014 then
1015
1016 printCheckbox( ak_query_pkg.g_items_table(i).update_flag,
1017 ak_query_pkg.g_items_table(i).value_id,
1018 l_value,
1019 ak_query_pkg.g_items_table(i).horizontal_alignment,
1020 ak_query_pkg.g_items_table(i).vertical_alignment,
1021 l_language_code,
1022 l_rowspan,
1023 '');
1024
1025 elsif l_item_styles(i) = 'IMAGE'
1026 then
1027
1028 printImage( ak_query_pkg.g_items_table(i),
1029 l_value,
1030 l_rowids(i),
1031 l_goto,
1032 l_session_id,
1033 l_language_code,
1034 l_rowspan);
1035
1036 elsif l_item_styles(i) = 'POPLIST'
1037 then
1038
1039 printPoplist( ak_query_pkg.g_items_table(i).lov_region_application_id,
1040 ak_query_pkg.g_items_table(i).lov_region_code,
1041 ak_query_pkg.g_items_table(i).update_flag,
1042 ak_query_pkg.g_items_table(i).value_id,
1043 l_value,
1044 ak_query_pkg.g_items_table(i).bold,
1045 ak_query_pkg.g_items_table(i).italic,
1046 ak_query_pkg.g_items_table(i).horizontal_alignment,
1047 ak_query_pkg.g_items_table(i).vertical_alignment,
1048 l_rowspan);
1049
1050 elsif l_item_styles(i) = 'DEFAULT_PKG'
1051 then
1052 htp.p('<TD ALIGN="'||ak_query_pkg.g_items_table(i).horizontal_alignment||'" ROWSPAN="'||l_rowspan||'" VALIGN="'||ak_query_pkg.g_items_table(i).vertical_alignment||'">');
1053 l_procedure_call := ak_query_pkg.g_items_table(i).region_defaulting_api_pkg||'.'||ak_query_pkg.g_items_table(i).region_defaulting_api_proc||'(:l_attribute_codes,:p_result_values)';
1054 p_result_values := '';
1055
1056 for i in l_region_items_start..l_region_items_end loop
1057 if ak_query_pkg.g_items_table(i).value_id is null
1058 then
1059 p_result_values := p_result_values||'*';
1060 else
1061 l_value := replace(l_values(l_value_id(i)),'*','~at~');
1062 l_value := replace(l_value,']','~end~');
1063 p_result_values := p_result_values||l_value||'*';
1064 end if;
1065 end loop;
1066 p_result_values := p_result_values||']';
1067 l_call := dbms_sql.open_cursor;
1068 dbms_sql.parse(l_call,'begin '||l_procedure_call||'; end;',dbms_sql.native);
1069 dbms_sql.bind_variable(l_call,'l_attribute_codes',l_attribute_codes);
1070 dbms_sql.bind_variable(l_call,'p_result_values',p_result_values);
1071 l_dummy := dbms_sql.execute(l_call);
1072 dbms_sql.close_cursor(l_call);
1073 htp.p('</TD>');
1074 elsif l_item_styles(i) = 'URL'
1075 then
1076 if l_values(l_value_id(l_url_display_sequence(i))) is null
1077 then
1078 printText( ak_query_pkg.g_items_table(i),
1079 l_data_types(i),
1080 l_value,
1081 l_rowids(i),
1082 l_goto,
1083 l_session_id,
1084 l_region_style,
1085 '',
1086 l_rowspan);
1087 else
1088 htp.tableData(cvalue => '<A HREF="'||replace(l_values(l_value_id(l_url_display_sequence(i))),'[PLSQL_AGENT]',FND_WEB_CONFIG.PLSQL_AGENT)||'" TARGET="_top">'
1089 ||icx_on_utilities.formatText(l_values(l_value_id(i)),ak_query_pkg.g_items_table(i).bold,ak_query_pkg.g_items_table(i).italic)
1090 ||'</A>', calign => ak_query_pkg.g_items_table(i).horizontal_alignment, cattributes => 'VALIGN="'||ak_query_pkg.g_items_table(i).vertical_alignment||'"', crowspan => l_rowspan);
1091 end if;
1092 else
1093 printText( ak_query_pkg.g_items_table(i),
1094 l_data_types(i),
1095 l_value,
1096 l_rowids(i),
1097 l_goto,
1098 l_session_id,
1099 l_region_style,
1100 '',
1101 l_rowspan);
1102 end if;
1103 end if;
1104 end loop; -- region_items
1105 htp.tableRowClose;
1106
1107 if l_rowspan = 2
1108 then
1109 htp.p('<TR BGColor="#'||l_data_multirow_color||'">');
1110 for i in l_region_items_start..l_region_items_end loop
1111 if ak_query_pkg.g_items_table(i).node_display_flag = 'Y'
1112 and ak_query_pkg.g_items_table(i).secured_column = 'F'
1113 then
1114 if l_item_styles(i) = 'SPINBOX'
1115 then
1116 printSpinboxdown( ak_query_pkg.g_items_table(i).update_flag,
1117 l_data_types(i),
1118 to_char((l_row_count-1)*l_update_total+l_update_counts(i)-1),
1119 l_language_code);
1120 end if;
1121 end if;
1122 end loop; -- region_items
1123 htp.tableRowClose;
1124 end if; -- l_rowspan = 2
1125
1126 end loop; -- ak_query_pkg.g_results_table
1127
1128 if l_total_result_count > 5 and l_query_set2 > 5 then
1129 htp.tableRowOpen;
1130 htp.tableRowClose;
1131 htp.tableRowOpen;
1132 htp.tableRowClose;
1133 htp.p('<TR BGColor="#'||l_header_color||'">');
1134 for i in l_region_items_start..l_region_items_end loop
1135 if ak_query_pkg.g_items_table(i).node_display_flag = 'Y'
1136 and ak_query_pkg.g_items_table(i).secured_column = 'F'
1137 then
1138 if l_item_styles(i) = 'BUTTON'
1139 then
1140 htp.tableData(cvalue => '<font color="#'||l_header_text_color||'"><BR>');
1141 elsif l_item_styles(i) = 'HIDDEN'
1142 then
1143 l_title := '';
1144 elsif l_item_styles(i) = 'SPINBOX' and l_data_types(i) = 'NUMBER'
1145 then
1146 htp.tableData(cvalue => '<font color="#'||l_header_text_color||'"><B>'||ak_query_pkg.g_items_table(i).attribute_label_long||'</B>', calign => 'CENTER', ccolspan => 2);
1147 else
1148 htp.tableData('<font color="#'||l_header_text_color||'"><B>'||ak_query_pkg.g_items_table(i).attribute_label_long||'</B>', calign => 'CENTER');
1149 end if;
1150 end if;
1151 end loop; -- region_items
1152 htp.tableRowClose;
1153 end if;
1154
1155 htp.tableClose;
1156 htp.formClose;
1157
1158 if l_total_result_count > 5
1159 then
1160
1161 icx_on_utilities2.displaySetIcons(l_language_code,icx_cabo.g_plsql_agent||'OracleON.IC',l_start_row,l_stop_row,icx_on_utilities.g_on_parameters(9),l_query_set,l_total_result_count,FALSE,'',icx_call.encrypt2(l_Y),l_update);
1162
1163 end if;
1164
1165 elsif l_region_style = 'FORM'
1166 then
1167
1168 l_data_singlerow_color := icx_util.get_color('TABLE_DATA_SINGLEROW');
1169 l_row_count := 0;
1170 l_display_count := 0;
1171 l_counter := 1;
1172 l_start_row := 1;
1173 l_stop_row := 2;
1174
1175 htp.tableOpen('BORDER=0');
1176
1177 for r in l_region_results_start..l_region_results_end loop
1178
1179 l_row_count := l_row_count + 1;
1180
1181 if l_start_row <= l_row_count and l_row_count <= l_stop_row
1182 then
1183
1184 icx_util.transfer_Row_To_Column(ak_query_pkg.g_results_table(r),l_values);
1185
1186 l_goto := ak_query_pkg.g_regions_table(p_region_rec_id).primary_key_name
1187 ||'*'||ak_query_pkg.g_results_table(r).key1||'*'||ak_query_pkg.g_results_table(r).key2||'*'||ak_query_pkg.g_results_table(r).key3||'*'||ak_query_pkg.g_results_table(r).key4||'*'||ak_query_pkg.g_results_table(r).key5
1188 ||'*'||ak_query_pkg.g_results_table(r).key6||'*'||ak_query_pkg.g_results_table(r).key7||'*'||ak_query_pkg.g_results_table(r).key8||'*'||ak_query_pkg.g_results_table(r).key9||'*'||ak_query_pkg.g_results_table(r).key10||'**]';
1189
1190 for i in l_region_items_start..l_region_items_end loop
1191
1192 if l_counter = 1
1193 and ak_query_pkg.g_items_table(i).node_display_flag = 'Y'
1194 and ak_query_pkg.g_items_table(i).secured_column = 'F'
1195 then
1196 htp.tableRowOpen;
1197 end if;
1198
1199 if l_value_id(i) is null
1200 then
1201 l_value := ak_query_pkg.g_items_table(i).attribute_label_long;
1202 else
1203 l_value := l_values(l_value_id(i));
1204 end if;
1205
1206 if ak_query_pkg.g_items_table(i).node_display_flag = 'N'
1207 or ak_query_pkg.g_items_table(i).secured_column = 'T'
1208 or (ak_query_pkg.g_items_table(i).attribute_label_long is null and l_value is null)
1209 then
1210 l_counter := l_counter;
1211 else
1212 if l_item_styles(i) = 'TEXT'
1213 then
1214
1215 htp.tableData(ak_query_pkg.g_items_table(i).attribute_label_long,'RIGHT','','','','','VALIGN='||ak_query_pkg.g_items_table(i).vertical_alignment);
1216 htp.tableData(' ');
1217
1218 printText( ak_query_pkg.g_items_table(i),
1219 l_data_types(i),
1220 l_value,
1221 l_rowids(i),
1222 l_goto,
1223 l_session_id,
1224 l_region_style,
1225 l_data_singlerow_color,
1226 l_rowspan);
1227
1228 elsif l_item_styles(i) = 'SPINBOX'
1229 then
1230
1231 htp.tableData(ak_query_pkg.g_items_table(i).attribute_label_long,'RIGHT','','','','','VALIGN=MIDDLE');
1232 htp.tableData(' ');
1233
1234 printSpinboxup( ak_query_pkg.g_items_table(i).update_flag,
1235 ak_query_pkg.g_items_table(i).required_flag,
1236 ak_query_pkg.g_items_table(i).attribute_label_long,
1237 l_data_types(i),
1238 l_value,
1239 ak_query_pkg.g_items_table(i).display_value_length,
1240 'Y',
1241 ak_query_pkg.g_items_table(i).italic,
1242 ak_query_pkg.g_items_table(i).horizontal_alignment,
1243 ak_query_pkg.g_items_table(i).vertical_alignment,
1244 to_char((l_row_count-1)*l_update_total+l_update_counts(i)-1),
1245 l_language_code,
1246 l_rowspan);
1247
1248 elsif l_item_styles(i) = 'BUTTON'
1249 then
1250
1251 printButton( ak_query_pkg.g_items_table(i),
1252 l_rowids(i),
1253 l_goto,
1254 l_session_id,
1255 l_rowspan,
1256 l_region_style);
1257
1258 elsif l_item_styles(i) = 'HIDDEN'
1259 then
1260 htp.formHidden('h',l_value);
1261
1262 elsif l_item_styles(i) = 'CHECKBOX'
1263 then
1264
1265 htp.tableData(' ');
1266 htp.tableData(' ');
1267
1268 printCheckbox( ak_query_pkg.g_items_table(i).update_flag,
1269 ak_query_pkg.g_items_table(i).value_id,
1270 l_value,
1271 ak_query_pkg.g_items_table(i).horizontal_alignment,
1272 ak_query_pkg.g_items_table(i).vertical_alignment,
1273 l_language_code,
1274 l_rowspan,
1275 ak_query_pkg.g_items_table(i).attribute_label_long);
1276
1277 elsif l_item_styles(i) = 'POPLIST'
1278 then
1279
1280 htp.tableData(ak_query_pkg.g_items_table(i).attribute_label_long,'RIGHT','','','','','VALIGN=MIDDLE');
1281 htp.tableData(' ');
1282
1283 printPoplist( ak_query_pkg.g_items_table(i).lov_region_application_id,
1284 ak_query_pkg.g_items_table(i).lov_region_code,
1285 ak_query_pkg.g_items_table(i).update_flag,
1286 ak_query_pkg.g_items_table(i).value_id,
1287 l_value,
1288 ak_query_pkg.g_items_table(i).bold,
1289 ak_query_pkg.g_items_table(i).italic,
1290 ak_query_pkg.g_items_table(i).horizontal_alignment,
1291 ak_query_pkg.g_items_table(i).vertical_alignment,
1292 l_rowspan);
1293 elsif l_item_styles(i) = 'DEFAULT_PKG'
1294 then
1295 htp.tableData(ak_query_pkg.g_items_table(i).attribute_label_long,'RIGHT','','','','','VALIGN=MIDDLE');
1296 htp.tableData(' ');
1297 htp.p('<TD ALIGN="'||ak_query_pkg.g_items_table(i).horizontal_alignment||'" ROWSPAN="'||l_rowspan||'" VALIGN="'||ak_query_pkg.g_items_table(i).vertical_alignment||'">');
1298 l_procedure_call := ak_query_pkg.g_items_table(i).region_defaulting_api_pkg||'.'||ak_query_pkg.g_items_table(i).region_defaulting_api_proc||'(:l_attribute_codes,:p_result_values)';
1299 p_result_values := '';
1300
1301 for i in l_region_items_start..l_region_items_end loop
1302 if ak_query_pkg.g_items_table(i).value_id is null
1303 then
1304 p_result_values := p_result_values||'*';
1305 else
1306 l_value := replace(l_values(l_value_id(i)),'*','~at~');
1307 l_value := replace(l_value,']','~end~');
1308 p_result_values := p_result_values||l_value||'*';
1309 end if;
1310 end loop;
1311 p_result_values := p_result_values||']';
1312 l_call := dbms_sql.open_cursor;
1313 dbms_sql.parse(l_call,'begin '||l_procedure_call||'; end;',dbms_sql.native);
1314 dbms_sql.bind_variable(l_call,'l_attribute_codes',l_attribute_codes);
1315 dbms_sql.bind_variable(l_call,'p_result_values',p_result_values);
1316 l_dummy := dbms_sql.execute(l_call);
1317 dbms_sql.close_cursor(l_call);
1318 htp.p('</TD>');
1319 elsif l_item_styles(i) = 'URL'
1320 then
1321 if l_values(l_value_id(l_url_display_sequence(i))) is null
1322 then
1323 htp.tableData(ak_query_pkg.g_items_table(i).attribute_label_long,'RIGHT','','','','','VALIGN=MIDDLE');
1324 htp.tableData(' ');
1325 printText( ak_query_pkg.g_items_table(i),
1326 l_data_types(i),
1327 l_value,
1328 l_rowids(i),
1329 l_goto,
1330 l_session_id,
1331 l_region_style,
1332 l_data_singlerow_color,
1333 l_rowspan);
1334 else
1335 htp.tableData(ak_query_pkg.g_items_table(i).attribute_label_long,'RIGHT','','','','','VALIGN=MIDDLE');
1336 htp.tableData(' ');
1337 htp.tableData(cvalue => '<A HREF="'||l_values(l_value_id(l_url_display_sequence(i)))||'">'
1338 ||icx_on_utilities.formatText(l_values(l_value_id(i)),'Y',ak_query_pkg.g_items_table(i).italic)
1339 ||'</A>', calign => ak_query_pkg.g_items_table(i).horizontal_alignment, cattributes => 'VALIGN="'||ak_query_pkg.g_items_table(i).vertical_alignment||'"', crowspan => l_rowspan);
1340 end if;
1341 else
1342 htp.tableData(ak_query_pkg.g_items_table(i).attribute_label_long,'RIGHT','','','','','VALIGN=MIDDLE');
1343 htp.tableData(' ');
1344 printText( ak_query_pkg.g_items_table(i),
1345 l_data_types(i),
1346 l_value,
1347 l_rowids(i),
1348 l_goto,
1349 l_session_id,
1350 l_region_style,
1351 l_data_singlerow_color,
1352 l_rowspan);
1353
1354 end if; -- item_styles
1355 end if; -- node_display_flag
1356
1357 if ak_query_pkg.g_items_table(i).node_display_flag = 'N'
1358 or ak_query_pkg.g_items_table(i).secured_column = 'T'
1359 then
1360 l_counter := l_counter;
1361 elsif l_counter = l_num_columns
1362 then
1363 htp.tableRowClose;
1364 if l_rowspan = 2
1365 then
1366 htp.tableRowOpen;
1367 for i in l_region_items_start..l_region_items_end loop
1368 if ak_query_pkg.g_items_table(i).node_display_flag = 'Y'
1369 and ak_query_pkg.g_items_table(i).secured_column = 'F'
1370 then
1371 if l_item_styles(i) = 'SPINBOX'
1372 then
1373 printSpinboxdown( ak_query_pkg.g_items_table(i).update_flag,
1374 l_data_types(i),
1375 to_char((l_row_count-1)*l_update_total+l_update_counts(i)-1),
1376 l_language_code);
1377 end if;
1378 end if;
1379 end loop; -- region_items
1380 htp.tableRowClose;
1381 end if;
1382 l_counter := 1;
1383 l_display_count := l_display_count + 1;
1384 l_table_rows(l_display_count) := l_table_row;
1385 l_table_row := '';
1386 else
1387 htp.tableData(' ');
1388 htp.tableData(' ');
1389 htp.tableData(' ');
1390 htp.tableData(' ');
1391 l_counter := l_counter + 1;
1392 end if;
1393
1394 end loop; -- region_items
1395
1396 end if; -- rows
1397
1398 end loop; -- results
1399
1400 htp.tableClose;
1401 htp.formClose;
1402
1403 end if; -- l_region_style
1404
1405 if l_update
1406 then
1407 icx_util.getPrompts(601,'ICX_WEB_ON',l_title,l_prompts);
1408 htp.tableOpen(cborder => 'BORDER=0');
1409 htp.tableRowOpen;
1410 htp.p('<TD>');
1411 icx_util.DynamicButton(P_ButtonText => l_prompts(6),
1412 P_ImageFileName => 'FNDBSBMT',
1413 P_OnMouseOverText => l_prompts(6),
1414 P_HyperTextCall => 'javascript:submitFunction()',
1415 P_LanguageCode => l_language_code,
1416 P_JavaScriptFlag => FALSE);
1417 htp.p('</TD>');
1418 if (instr(c_browser,'MSIE 3')=0) then
1419 htp.p('<TD>');
1420 icx_util.DynamicButton(P_ButtonText => l_prompts(7),
1421 P_ImageFileName => 'FNDBCLR',
1422 P_OnMouseOverText => l_prompts(7),
1423 P_HyperTextCall => 'javascript:resetFunction()',
1424 P_LanguageCode => l_language_code,
1425 P_JavaScriptFlag => FALSE);
1426 htp.p('</TD>');
1427 end if; -- browser = 'MSIE 3'
1428 htp.tableRowClose;
1429 htp.tableClose;
1430 end if; -- update
1431
1432 end if; -- no region items
1433
1434 end;
1435
1436 procedure printPLSQLtables is
1437
1438 begin
1439
1440 htp.p('===============================================================');htp.nl;
1441 htp.p('REGIONS');htp.nl;
1442 htp.p('===============================================================');htp.nl;
1443 htp.p('Total Regions = '||to_char(ak_query_pkg.g_regions_table.COUNT));htp.nl;
1444 FOR i IN ak_query_pkg.g_regions_table.FIRST..ak_query_pkg.g_regions_table.LAST LOOP
1445 htp.p('Regions Table Row ='||to_char(i));htp.nl;
1446 htp.p('- region_rec_id = '||to_char(ak_query_pkg.g_regions_table(i).region_rec_id));htp.nl;
1447 htp.p('- parent_region_rec_id = '||to_char(ak_query_pkg.g_regions_table(i).parent_region_rec_id));htp.nl;
1448 htp.p('- total_result_count = '||to_char(ak_query_pkg.g_regions_table(i).total_result_count));htp.nl;
1449 htp.p('- flow_application_id = '||to_char(ak_query_pkg.g_regions_table(i).flow_application_id));htp.nl;
1450 htp.p('- flow_code = '||ak_query_pkg.g_regions_table(i).flow_code);htp.nl;
1451 htp.p('- page_application_id = '||to_char(ak_query_pkg.g_regions_table(i).page_application_id));htp.nl;
1452 htp.p('- page_code = '||ak_query_pkg.g_regions_table(i).page_code);htp.nl;
1453 htp.p('- region_application_id = '||to_char(ak_query_pkg.g_regions_table(i).region_application_id));htp.nl;
1454 htp.p('- region_code = '||ak_query_pkg.g_regions_table(i).region_code);htp.nl;
1455 htp.p('- primary_key_name = '||ak_query_pkg.g_regions_table(i).primary_key_name);htp.nl;
1456 htp.p('- name = '||ak_query_pkg.g_regions_table(i).name);htp.nl;
1457 htp.p('- region_style = '||ak_query_pkg.g_regions_table(i).region_style);htp.nl;
1458 htp.p('- number_of_format_columns = '||to_char(ak_query_pkg.g_regions_table(i).number_of_format_columns));htp.nl;
1459 htp.p('- region_defaulting_api_pkg = '||ak_query_pkg.g_regions_table(i).region_defaulting_api_pkg);htp.nl;
1460 htp.p('- region_defaulting_api_proc= '||ak_query_pkg.g_regions_table(i).region_defaulting_api_proc);htp.nl;
1461 htp.p('- region_validation_api_pkg = '||ak_query_pkg.g_regions_table(i).region_validation_api_pkg);htp.nl;
1462 htp.p('- region_validation_api_proc= '||ak_query_pkg.g_regions_table(i).region_validation_api_proc);htp.nl;
1463 htp.p('- object_defaulting_api_pkg = '||ak_query_pkg.g_regions_table(i).object_defaulting_api_pkg);htp.nl;
1464 htp.p('- object_defaulting_api_proc= '||ak_query_pkg.g_regions_table(i).object_defaulting_api_proc);htp.nl;
1465 htp.p('- object_validation_api_pkg = '||ak_query_pkg.g_regions_table(i).object_validation_api_pkg);htp.nl;
1466 htp.p('- object_validation_api_proc= '||ak_query_pkg.g_regions_table(i).object_validation_api_proc);htp.nl;
1467 END LOOP;
1468
1469 htp.p('===============================================================');htp.nl;
1470 htp.p('ITEMS');htp.nl;
1471 htp.p('===============================================================');htp.nl;
1472 htp.p('Total Items = '||to_char(ak_query_pkg.g_items_table.COUNT));htp.nl;
1473 FOR i IN 0..(ak_query_pkg.g_items_table.COUNT - 1) LOOP
1474 htp.p('Item Table Row ='||to_char(i));htp.nl;
1475 htp.p('- region_rec_id = '||to_char(ak_query_pkg.g_items_table(i).region_rec_id));htp.nl;
1476 htp.p('- value_id = '||to_char(ak_query_pkg.g_items_table(i).value_id));htp.nl;
1477 htp.p('- attribute_application_id = '||to_char(ak_query_pkg.g_items_table(i).attribute_application_id));htp.nl;
1478 htp.p('- attribute_code = '||ak_query_pkg.g_items_table(i).attribute_code);htp.nl;
1479 htp.p('- attribute_label_long = '||ak_query_pkg.g_items_table(i).attribute_label_long);htp.nl;
1480 htp.p('- attribute_label_length = '||to_char(ak_query_pkg.g_items_table(i).attribute_label_length));htp.nl;
1481 htp.p('- display_value_length = '||to_char(ak_query_pkg.g_items_table(i).display_value_length));htp.nl;
1482 htp.p('- display_sequence = '||to_char(ak_query_pkg.g_items_table(i).display_sequence));htp.nl;
1483 htp.p('- item_style = '||ak_query_pkg.g_items_table(i).item_style);htp.nl;
1484 htp.p('- bold = '||ak_query_pkg.g_items_table(i).bold);htp.nl;
1485 htp.p('- italic = '||ak_query_pkg.g_items_table(i).italic);htp.nl;
1486 htp.p('- vertical_alignment = '||ak_query_pkg.g_items_table(i).vertical_alignment);htp.nl;
1487 htp.p('- horizontal_alignment = '||ak_query_pkg.g_items_table(i).horizontal_alignment);htp.nl;
1488 htp.p('- object_attribute_flag = '||ak_query_pkg.g_items_table(i).object_attribute_flag);htp.nl;
1489 htp.p('- secured_column = '||ak_query_pkg.g_items_table(i).secured_column);htp.nl;
1490 htp.p('- node_query_flag = '||ak_query_pkg.g_items_table(i).node_query_flag);htp.nl;
1491 htp.p('- node_display_flag = '||ak_query_pkg.g_items_table(i).node_display_flag);htp.nl;
1492 htp.p('- update_flag = '||ak_query_pkg.g_items_table(i).update_flag);htp.nl;
1493 htp.p('- required_flag = '||ak_query_pkg.g_items_table(i).required_flag);htp.nl;
1494 htp.p('- icx_custom_call = '||ak_query_pkg.g_items_table(i).icx_custom_call);htp.nl;
1495 htp.p('- region_defaulting_api_pkg = '||ak_query_pkg.g_items_table(i).region_defaulting_api_pkg);htp.nl;
1496 htp.p('- region_defaulting_api_proc = '||ak_query_pkg.g_items_table(i).region_defaulting_api_proc);htp.nl;
1497 htp.p('- region_validation_api_pkg = '||ak_query_pkg.g_items_table(i).region_validation_api_pkg);htp.nl;
1498 htp.p('- region_validation_api_proc = '||ak_query_pkg.g_items_table(i).region_validation_api_proc);htp.nl;
1499 htp.p('- object_defaulting_api_pkg = '||ak_query_pkg.g_items_table(i).object_defaulting_api_pkg);htp.nl;
1500 htp.p('- object_defaulting_api_proc = '||ak_query_pkg.g_items_table(i).object_defaulting_api_proc);htp.nl;
1501 htp.p('- object_validation_api_pkg = '||ak_query_pkg.g_items_table(i).object_validation_api_pkg);htp.nl;
1502 htp.p('- object_validation_api_proc = '||ak_query_pkg.g_items_table(i).object_validation_api_proc);htp.nl;
1503 END LOOP;
1504
1505 htp.p('===============================================================');htp.nl;
1506 htp.p('RESULTS');htp.nl;
1507 htp.p('===============================================================');htp.nl;
1508 htp.p('Total Results = '||to_char(ak_query_pkg.g_results_table.COUNT));htp.nl;
1509
1510 if ak_query_pkg.g_results_table.COUNT <> 0
1511 then
1512
1513 FOR i IN ak_query_pkg.g_results_table.FIRST..ak_query_pkg.g_results_table.LAST LOOP
1514 htp.p('Results Table Row ='||to_char(i));htp.nl;
1515 htp.p('- region_rec_id = '||to_char(ak_query_pkg.g_results_table(i).region_rec_id));htp.nl;
1516 htp.p('- key1 = '||ak_query_pkg.g_results_table(i).key1);htp.nl;
1517 htp.p('- key2 = '||ak_query_pkg.g_results_table(i).key2);htp.nl;
1518 htp.p('- key3 = '||ak_query_pkg.g_results_table(i).key3);htp.nl;
1519 htp.p('- key4 = '||ak_query_pkg.g_results_table(i).key4);htp.nl;
1520 htp.p('- key5 = '||ak_query_pkg.g_results_table(i).key5);htp.nl;
1521 htp.p('- value1 = '||ak_query_pkg.g_results_table(i).value1);htp.nl;
1522 htp.p('- value2 = '||ak_query_pkg.g_results_table(i).value2);htp.nl;
1523 htp.p('- value3 = '||ak_query_pkg.g_results_table(i).value3);htp.nl;
1524 htp.p('- value4 = '||ak_query_pkg.g_results_table(i).value4);htp.nl;
1525 htp.p('- value5 = '||ak_query_pkg.g_results_table(i).value5);htp.nl;
1526 htp.p('- value6 = '||ak_query_pkg.g_results_table(i).value6);htp.nl;
1527 htp.p('- value7 = '||ak_query_pkg.g_results_table(i).value7);htp.nl;
1528 htp.p('- value8 = '||ak_query_pkg.g_results_table(i).value8);htp.nl;
1529 htp.p('- value9 = '||ak_query_pkg.g_results_table(i).value9);htp.nl;
1530 htp.p('- value10 = '||ak_query_pkg.g_results_table(i).value10);htp.nl;
1531 END LOOP;
1532
1533 end if;
1534
1535 end;
1536
1537 end icx_on_utilities2;