[Home] [Help]
PACKAGE BODY: APPS.ICX_DEFINE_PAGES
Source
1 package body ICX_DEFINE_PAGES as
2 /* $Header: ICXCNPAB.pls 120.0 2005/10/07 12:13:47 gjimenez noship $ */
3
4
5 procedure Error
6 as
7 error_name varchar2(30);
8 error_message varchar2(2000);
9 error_stack varchar2(32000);
10 begin
11 htp.htmlOpen;
12 htp.headOpen;
13 htp.title(wf_core.translate('ERROR'));
14 htp.headClose;
15
16 begin
17 wfa_sec.Header(background_only=>TRUE);
18 exception
19 when others then
20 htp.bodyOpen;
21 end;
22
23 htp.header(nsize=>1, cheader=>wf_core.translate('ERROR'));
24 wf_core.get_error(error_name, error_message, error_stack);
25
26 if (error_name is not null) then
27 htp.p(error_message);
28 else
29 htp.p(sqlerrm);
30 end if;
31
32 htp.hr;
33 htp.p(wf_core.translate('WFENG_ERRNAME')||': '||error_name);
34 htp.br;
35 htp.p(wf_core.translate('WFENG_ERRSTACK')||': '||
36 replace(error_stack,wf_core.newline,'<br>'));
37
38 wfa_sec.Footer;
39 htp.htmlClose;
40 end Error;
41
42 -- ***********************************************
43 -- procedure DispPageDialog
44 -- ***********************************************
45 procedure DispPageDialog
46 (p_mode in varchar2 ,
47 p_page_id in varchar2 ) is
48
49 first_seed boolean := TRUE;
50 l_page_name varchar2(80);
51 l_title varchar2(80);
52 l_message varchar2(240) := 'Please select a Page';
53 l_dialog icxui_api_dialog;
54 l_button icxui_api_button;
55 l_button2 icxui_api_button;
56 l_button_list icxui_api_button_list;
57
58 l_region icx_api_region.region_record;
59 l_user_id number;
60 l_page_id varchar2(30);
61 username varchar2(30);
62 l_function_syntax varchar2(2000) := 'javascript:cancelsubmit()';
63 l_agent varchar2(80);
64 l_alert VARCHAR2(120);
65
66 cursor wlistcurs is
67 select ip.page_id, ipt.page_name, ip.page_type
68 from icx_pages ip,
69 icx_pages_tl ipt
70 where ip.user_id = l_user_id
71 and ipt.language = userenv('LANG')
72 and ip.page_id = ipt.page_id
73 and ip.page_type in ('USER', 'SEED')
74 order by PAGE_TYPE DESC, SEQUENCE_NUMBER;
75
76 begin
77
78 -- Check session and current user
79 wfa_sec.GetSession(username);
80 username := upper(username);
81
82 l_user_id:= icx_sec.getID(icx_sec.PV_WEB_USER_ID);
83
84 l_agent := FND_WEB_CONFIG.WEB_SERVER || icx_plug_utilities.getPLSQLagent;
85
86 if (p_page_id IS NOT NULL) then
87
88 select MAX(page_name)
89 into l_page_name
90 from icx_pages_tl
91 where page_id = p_page_id
92 and language = userenv('LANG');
93
94 end if;
95
96 if (p_mode = 'DELETE') then
97
98 l_title := wf_core.translate('ICX_CONFIRMTITLE');
99
100 elsif (p_mode = 'RENAME') then
101
102 l_title := wf_core.translate('RENAME');
103
104 elsif (p_mode = 'COPY') then
105
106 l_title := wf_core.translate('COPY');
107
108 else
109
110 l_title := wf_core.translate('WFDM_CREATE');
111
112 end if;
113
114 -- HTML Open
115 htp.htmlOpen;
116
117 -- HTML Header Open
118 htp.headOpen;
119
120 htp.p('<SCRIPT LANGUAGE="JavaScript">');
121
122 htp.p('<!-- Comment out script for old browers');
123
124 htp.p('function cancelsubmit() {
125 self.close();
126 }');
127
128 htp.p('function selectTo() {
129 alert("'||l_message||'");
130 }');
131
132 htp.p('function applySubmit() { ');
133 IF p_mode IN ('CREATE','RENAME','COPY') THEN
134
135 fnd_message.set_name('FND','FND_MISSING_REQUIRED_VALUE');
136 l_alert:= FND_MESSAGE.GET;
137 htp.p(' if (document.new_pagename.p_page_name.value==""){
138 alert("'||l_alert||' '||wf_core.translate('NEW_PAGE_NAME')||'");
139 document.new_pagename.p_page_name.value="'||l_page_name||'"
140 }else{
141 document.new_pagename.submit();
142 }');
143 END IF;
144 -- htp.p(' document.new_pagename.submit();');
145 htp.p(' }' ); -- moved all reload and close logic to the savepage code --mputman bug 1936581
146
147 htp.p ('function applyDelete(url){
148
149 top.opener.parent.location = url;
150
151 // Close the window
152 window.close();
153
154 }');
155
156 htp.p('//-->');
157 htp.p('</SCRIPT>');
158
159 -- HTML Head Close
160 htp.headClose;
161
162 if (p_mode = 'CREATE') then
163
164 l_function_syntax := 'javascript:applySubmit()';
165
166 -- Construct the Button and the Button list
167 l_button := icxui_api_button.create_button(
168 p_button_name => wf_core.translate('APPLY'),
169 p_button_url => l_function_syntax);
170
171 elsif (p_mode = 'DELETE') then
172
173 l_function_syntax := 'javascript:applyDelete('''||'icx_define_pages.savepage?p_mode=DELETE&p_page_id='||p_page_id||''')';
174
175 -- Construct the Button and the Button list
176 l_button := icxui_api_button.create_button(
177 p_button_name => wf_core.translate('APPLY'),
178 p_button_url => l_function_syntax);
179
180 elsif (p_mode = 'COPY') then
181
182 l_function_syntax := 'javascript:applySubmit()';
183
184 -- Construct the Button and the Button list
185 l_button := icxui_api_button.create_button(
186 p_button_name => wf_core.translate('APPLY'),
187 p_button_url => l_function_syntax);
188
189 elsif (p_mode = 'RENAME') then
190
191 l_function_syntax := 'javascript:applySubmit()';
192
193 -- Construct the Button and the Button list
194 l_button := icxui_api_button.create_button(
195 p_button_name => wf_core.translate('APPLY'),
196 p_button_url => l_function_syntax);
197
198 end if;
199
200 l_button2 := icxui_api_button.create_button(p_button_name => wf_core.translate('CANCEL'),
201 p_button_url => 'javascript:cancelsubmit()');
202
203
204 l_button_list := icxui_api_button_list(l_button, l_button2);
205
206 -- Construct the Dialog
207 l_dialog := icxui_api_dialog.create_dialog(
208 p_title => l_title,
209 p_subheader_text => ' ',
210 p_buttons => l_button_list);
211
212 -- HTML Body Open
213 htp.p('<BODY bgcolor="#CCCCCC">');
214
215 htp.centerOpen;
216
217 -- Form Open
218 htp.formOpen(cattributes => 'NAME="new_pagename"',
219 curl => l_agent || 'icx_define_pages.savePage',
220 cmethod => 'POST',
221 cenctype => 'multipart/form-data'); --mputman reodered
222
223 -- Draw the Dialog Title Bar
224 l_dialog.open_dialog;
225
226 -- TABLE FOR THE FORM ELEMENTS
227 -- htp.tableRowOpen;
228 -- wwutl_htp.tableDataOpen;
229 htp.tableOpen(cattributes=>'cellspacing="0" cellpadding="0" border="0" width="80%"');
230
231 if (p_mode = 'COPY') then
232
233 htp.p('<tr><td valign=top>'||wf_core.translate('COPY')||'</td>');
234
235 htp.p('<td>');
236
237 htp.p('<select width="200" name="p_page_id" size=10>');
238
239 -- set the pagess that have already been selected
240 for rec in wlistcurs loop
241
242 if (rec.page_type = 'SEED' and first_seed = TRUE) then
243
244 htp.formSelectOption(cvalue => wf_core.translate('ICX_PREDEFINED'),
245 cattributes => 'VALUE="'||to_char(rec.page_id)||'"');
246
247 first_seed := FALSE;
248
249 end if;
250
251 htp.formSelectOption(cvalue => rec.page_name,
252 cattributes => 'VALUE="'||to_char(rec.page_id)||'"');
253
254 end loop;
255
256 htp.formSelectClose;
257
258 htp.p('</td></tr>');
259
260 htp.p('<tr><td> </td></tr>');
261
262 end if;
263
264 -- Old Page Name
265 if (p_mode IN ('RENAME', 'DELETE')) then
266
267 htp.tableRowOpen;
268 htp.tableData(cvalue=>wf_core.translate('PAGE_NAME'),
269 cattributes => 'VALIGN="MIDDLE"');
270
271 htp.tableData('<B>'||l_page_name||'</B>', cattributes => 'VALIGN="MIDDLE"');
272 htp.tableRowClose;
273 htp.formHidden('p_page_id', p_page_id);
274
275 end if;
276
277 if (p_mode IN ('COPY', 'CREATE', 'RENAME')) THEN
278
279
280
281 htp.tableRowOpen;
282 htp.tableData(wf_core.translate('NEW_PAGE_NAME'),
283 cattributes => 'VALIGN="MIDDLE"');
284
285 htp.tableData(htf.fontOpen(cface => 'arial,helvetica')
286 || htf.formText(cname => 'p_page_name', csize => '20', cmaxlength => '30',
287 cattributes => 'VALUE="'||l_page_name||'"')|| --mputman removed onClick
288 htf.fontClose, cattributes => 'VALIGN="MIDDLE"');
289 htp.tableRowClose;
290 htp.formHidden('p_mode',p_mode);
291
292 end if;
293
294
295 -- CLOSE THE TABLE FOR THE FORM ELEMENTS
296 htp.tableClose;
297
298 -- Draw the dialog footer
299 l_dialog.close_dialog;
300
301 -- CLOSE FORM
302 htp.formClose;
303
304 htp.centerClose;
305
306 -- Close Body
307 htp.bodyClose;
308
309 -- Close HTML
310 htp.htmlClose;
311
312 exception
313 when others then
314 rollback;
315 wf_core.context('icx_define_pages', 'DispPageDialog');
316 Error;
317 end DispPageDialog;
318
319 procedure OrderPages(
320 Pages in VARCHAR2,
321 oldPages in varchar2,
322 calledfrom in varchar2) is
323
324 l_done boolean := FALSE;
325 l_user_id number;
326 l_position number := 0;
327 l_page_id varchar2(30);
328 username varchar2(30);
329 l_pages varchar2(4000);
330
331 Begin
332
333 -- Check session and current user
334 wfa_sec.GetSession(username);
335 username := upper(username);
336
337 l_user_id:= icx_sec.getID(icx_sec.PV_WEB_USER_ID);
338
339 -- Validate the user
340 if (username is null) then
341 -- No username entered
342 wfa_html.Login('WFA_ENTER_ID');
343 return;
344 end if;
345
346 l_pages := pages;
347
348 while (l_done = FALSE) loop
349
350 if (instr(l_pages, ':') > 0) then
351
352 l_page_id := SUBSTR(l_pages, 1, instr(l_pages, ':') - 1);
353 l_pages := SUBSTR(l_pages, instr(l_pages, ':') + 1);
354
355 else
356
357 -- Make sure to get the last page
358 l_page_id := l_pages;
359 l_done := TRUE;
360
361 end if;
362
363 if (l_page_id IS NOT NULL) then
364
365 l_position := l_position + 1;
366
367 update icx_pages
368 set SEQUENCE_NUMBER = l_position
369 where user_id = l_user_id
370 and page_id = TO_NUMBER(l_page_id);
371
372 end if;
373
374 end loop;
375
376 -- use owa_util.redirect_url to redirect the URL to the home page
377 owa_util.redirect_url(curl=>wfa_html.base_url ||
378 '/icx_define_pages.PageList',
379 bclose_header=>TRUE);
380
381
382 exception
383 when others then
384 rollback;
385 wf_core.context('icx_define_pages', 'OrderPages');
386 Error;
387
388 END OrderPages;
389
390 procedure SavePage(
391 P_request in varchar2,
392 P_Mode in varchar2,
393 P_Page_id in varchar2,
394 P_Page_Name in varchar2) IS
395
396 l_user_id number;
397 l_position number := 0;
398 l_page_id varchar2(30);
399 username varchar2(30);
400 l_pages varchar2(4000);
401
402 BEGIN
403 -- Check session and current user
404 wfa_sec.GetSession(username);
405 username := upper(username);
406
407 l_user_id:= icx_sec.getID(icx_sec.PV_WEB_USER_ID);
408
409 -- Validate the user
410 if (username is null) then
411 -- No username entered
412 wfa_html.Login('WFA_ENTER_ID');
413 return;
414 end if;
415
416 if (p_mode = 'CREATE') then
417 -- Get the new page id
418
419 l_page_id := oracleconfigure.createpage (
420 p_page_type => 'USER',
421 p_page_name => p_page_name);
422
423 elsif (p_mode = 'RENAME') then
424
425 -- Set the new page name
426 oracleconfigure.renamepage (
427 p_page_id => p_page_id,
428 p_page_name => p_page_name);
429
430 elsif (p_mode = 'COPY') then
431
432 -- Get the new page id
433 l_page_id := oracleconfigure.copypage (
434 p_page_id => p_page_id,
435 p_page_name => p_page_name);
436
437 elsif (p_mode = 'DELETE') then
438
439 -- Set the new page name
440 oracleconfigure.deletepage (p_page_id => p_page_id);
441
442 -- use owa_util.redirect_url to redirect the URL to the home page
443 owa_util.redirect_url(curl=>wfa_html.base_url ||
444 '/icx_define_pages.editpagelist',
445 bclose_header=>TRUE);
446
447 end if;
448 if (p_mode in ('CREATE', 'COPY', 'RENAME') ) then
449 -- removed browser specific code and added parent reload and window close
450 -- mputman 1936581
451 htp.p('<SCRIPT>');
452 htp.p('parent.opener.location.reload();');
453 htp.p('window.close();');
454 htp.p('</SCRIPT>');
455
456 end if;
457 exception
458 when others then
459 rollback;
460 wf_core.context('icx_define_pages', 'OrderPages');
461 Error;
462
463 END SavePage;
464
465
466 procedure PageList is
467
468 l_user_id number;
469 l_title varchar2(80);
470 old_plist varchar2(2000);
471 l_message varchar2(2000);
472 l_nbsp varchar2(240);
473 l_history varchar2(240);
474 l_prompt_length number;
475
476 username varchar2(30);
477 l_actions icx_cabo.actionTable;
478
479
480 cursor wlistcurs is
481 select ip.page_id, ipt.page_name
482 from icx_pages ip,
483 icx_pages_tl ipt
484 where ip.user_id = l_user_id
485 and ipt.language = userenv('LANG')
486 and ip.page_id = ipt.page_id
487 and ip.page_type = 'USER'
488 order by ip.sequence_number;
489
490 begin
491
492 -- Check session and current user
493 wfa_sec.GetSession(username);
494 username := upper(username);
495
496 l_user_id:= icx_sec.getID(icx_sec.PV_WEB_USER_ID);
497
498 -- Validate the user
499 if (username is null) then
500 -- No username entered
501 wfa_html.Login('WFA_ENTER_ID');
502 return;
503 end if;
504
505
506 l_title := 'Maintain Pages';
507 l_nbsp := '&'||'nbsp;';
508
509 if instr(owa_util.get_cgi_env('HTTP_USER_AGENT'),'MSIE') > 0
510 then
511 l_history := '';
512 else
513 l_history := 'history.go(0);';
514 end if;
515
516 htp.p('<html>');
517 htp.p('<head>');
518 htp.p('<title>'||l_title||'</title>');
519 htp.p('</head>');
520
521 wfa_sec.Header(background_only=>TRUE,
522 page_title=>wf_core.translate('MAINTAIN_PAGES'),
523 inc_lov_applet=>FALSE);
524
525 htp.p('<SCRIPT LANGUAGE="JavaScript">');
526
527 l_prompt_length := 0;
528
529 l_message := wf_core.translate('SELECT_PAGE');
530
531 htp.p('<!-- Comment out script for old browers');
532
533 htp.p('function selectTo() {
534 alert("'||l_message||'")
535 }');
536
537 htp.p('function swap(e1, e2)
538 {
539 ttext = e1.text;
540 tvalue = e1.value;
541 e1.text = e2.text;
542 e1.value = e2.value;
543 e2.text = ttext;
544 e2.value = tvalue;
545 }');
546
547 htp.p('function deleteBlankRowIfNotEmpty(toList)
548 {
549 var idx = -1;
550 var val = "";
551 // find a blank row in table
552 for (i = 0; i < toList.length; i++){
553 val = toList.options[i].value;
554 if (val == "") {
555 idx = i;
556 break;
557 }
558 }
559 if (idx >= 0 && (toList.length > 1))
560 toList.options[idx] = null;
561 }');
562
563 htp.p('function moveElementUp(toList, p_formname)
564 { // go through the list and get all selected items
565 for ( i = 0; i <= toList.length-1; i++)
566 { // if the item is selected then swap it
567 if (toList.options[i].selected)
568 { // check if it is not the first item
569 if (i != 0)
570 {
571 swap(toList.options[i], toList.options[i - 1]);
572 toList.options[i - 1].selected = true;
573 toList.options[i].selected = false;
574 }
575 }
576 }
577 }');
578
579 htp.p('function moveElementDown(toList, p_formname)
580 { // go through the list and get all selected items
581 for ( i = toList.length-1; i >= 0; i--)
582 { // if the item is selected then swap it
583 if (toList.options[i].selected)
584 { // check if it is not the first item
585 if (i != toList.length-1)
586 {
587 swap(toList.options[i], toList.options[i + 1]);
588 toList.options[i + 1].selected = true;
589 toList.options[i].selected = false;
590 }
591 }
592 }
593 }');
594
595 htp.p('function moveElementTop(toList, p_formname)
596 { // get the first item selected which needs to move to top
597 iSelected = toList.selectedIndex;
598 if (iSelected == 0)
599 return;
600 // now run the moveup loop
601 for ( iMoveTop = 1; iMoveTop <= iSelected; iMoveTop++)
602 moveElementUp(toList);
603 }');
604
605 htp.p('function moveElementBottom(toList, p_formname)
606 { // get the last item selected which needs to move to bottom
607 for ( i = 0; i <= toList.length-1; i++)
608 { // if the item is selected then swap it
609 if (toList.options[i].selected)
610 iSelected = i;
611 }
612 if (iSelected == toList.length-1)
613 return;
614 iSelected = toList.length - 1 - iSelected;
615 // now run the movedown loop
616 for ( iMoveDown = 1; iMoveDown <= iSelected; iMoveDown++)
617 moveElementDown(toList);
618 }');
619
620 htp.p ('function Rename() {
621 var temp=document.PageList.C.selectedIndex;
622 if (temp < 0)
623 selectTo();
624 else {
625 var valuestring=document.PageList.C.options[temp].value;
626 popupWin = window.open("'||wfa_html.base_url ||
627 '/icx_define_pages.DispPageDialog?p_mode=RENAME&p_page_id=" + valuestring,
628 "EditRegion", "statusbar=Y,resizable,width=575,height=300");
629 }
630 }');
631
632 htp.p ('function Delete() {
633 var temp=document.PageList.C.selectedIndex;
634 if (temp < 0)
635 selectTo();
636 else {
637 var valuestring=document.PageList.C.options[temp].value;
638 popupWin = window.open("'||wfa_html.base_url ||
639 '/icx_define_pages.DispPageDialog?p_mode=DELETE&p_page_id="+ valuestring,
640 "EditRegion", "statusbar=Y,resizable,width=575,height=300");
641 }
642 }');
643
644 htp.p ('function Copy() {
645 popupWin = window.open("'||wfa_html.base_url ||
646 '/icx_define_pages.DispPageDialog?p_mode=COPY",
647 "EditRegion", "statusbar=Y,resizable,width=575,height=400");
648 }');
649
650 htp.p('function Edit() {
651 var temp=document.PageList.C.selectedIndex;
652 if (temp < 0)
653 selectTo();
654 else {
655 var valuestring=document.PageList.C.options[temp].value;
656
657 top.location.href ="'||wfa_html.base_url ||'/oracleconfigure.customize?p_page_id=" + valuestring;
658 }
659 }');
660
661 htp.p ('function createNew() {
662 popupWin = window.open("'||wfa_html.base_url ||
663 '/icx_define_pages.DispPageDialog?p_mode=CREATE",
664 "EditRegion", "statusbar=Y,resizable,width=575,height=300");
665 }');
666
667
668 htp.p('function saveOrder() {
669 var end=document.PageList.C.length;
670
671 document.updatePageList.pages.value = "";
672
673 for (var i=0; i<end; i++)
674 if (document.PageList.C.options[i].value != "")
675 document.updatePageList.pages.value = document.updatePageList.pages.value + ":" + document.PageList.C.options[i].value;
676
677 document.updatePageList.submit();
678
679 }');
680
681 htp.p('function cancelPage() {
682 top.location.href = "'||wfa_html.base_url ||'/oraclemypage.home";
683 }');
684
685 htp.p('//-->');
686 htp.p('</SCRIPT>');
687
688 htp.p('<BODY bgcolor="#CCCCCC">');
689 htp.formOpen('javascript:saveOrder()','POST','','','NAME="PageList"');
690
691 htp.p('<table width="100%" border=0 cellspacing=0 cellpadding=0>'); -- main
692
693 htp.p('<tr><td align=center><BR>');
694
695 htp.p('<table width="10%" border=0 cellspacing=10 cellpadding=0>'); -- Cell
696
697 htp.p('<tr><td align=center><B> ' || wf_core.translate('PAGE_NAME') || '</B></td></tr>');
698
699 htp.p('<tr><td>');
700
701 htp.p('<select width="200" name="C" size=10>');
702
703 old_plist:='';
704
705 -- set the pagess that have already been selected
706 for rec in wlistcurs loop
707
708 htp.formSelectOption(cvalue => rec.page_name,
709 cattributes => 'VALUE="'||to_char(rec.page_id)||'"');
710
711 old_plist:= old_plist ||':'||to_char(rec.page_id);
712
713 end loop;
714
715 htp.formSelectClose;
716
717 htp.p('</td><td align="left">');
718
719 htp.p('<table border=0><tr><td align="left" valign="top">');
720
721 htp.p('<A HREF="javascript:moveElementTop(document.PageList.C,'||''''||
722 'PageList'||''''||');" onMouseOver="window.status='''||'Top'||''';return true"><image src="/OA_MEDIA/movetop.gif" alt="'||wf_core.translate('TOP')||'" BORDER="0"></A>');
723
724 htp.p('</td></tr><tr><td align="left">');
725
726 htp.p('<A HREF="javascript:moveElementUp(document.PageList.C,'||''''||
727 'PageList'||''''||');" onMouseOver="window.status='''||'Up'||''';return true"><image src="/OA_MEDIA/moveup.gif" alt="'||wf_core.translate('UP')||'" BORDER="0"></A>');
728
729 htp.p('</td></tr><tr><td align="left">');
730
731 htp.p('<A HREF="javascript:moveElementDown(document.PageList.C,'||''''||
732 'PageList'||''''||');" onMouseOver="window.status='''||'Down'||''';return true"><image src="/OA_MEDIA/movedown.gif" alt="'||wf_core.translate('DOWN')||'" BORDER="0"></A>');
733
734 htp.p('</td></tr><tr><td align="left">');
735
736 htp.p('<A HREF="javascript:moveElementBottom(document.PageList.C,'||''''||
737 'PageList'||''''||');" onMouseOver="window.status='''||'Bottom'||''';return true"><image src="/OA_MEDIA/movebottom.gif" alt="'||wf_core.translate('BOTTOM')||'" BORDER="0"></A>');
738
739 htp.p('</td></tr></table>'); -- Up and Down
740
741
742 htp.p('</td></tr>'); --close first row
743
744 htp.p('<tr><td colspan=2>'); --second row
745
746 htp.p('</td></tr>'); --end second row
747 htp.p('</table>'); -- Cell
748 htp.p('</td></tr>');
749
750 htp.p('<tr><td><br></td></tr>');
751
752 htp.p('<tr><td align=center>');
753
754 htp.p('</td></tr></table>'); -- Main
755
756 htp.formClose;
757
758 -- add real form that does the posting
759 htp.formOpen('icx_define_pages.OrderPages','POST','','','NAME="updatePageList"');
760 htp.formHidden(cname=>'pages');
761 htp.formHidden(cname=>'oldpages',cvalue=>old_plist);
762 htp.formHidden(cname=>'calledfrom');
763 htp.formClose;
764
765 -- finally add buttons for cabo page.
766 -- these cause javascript error if procedure not called from
767 -- cabo frame.
768
769 l_actions(0).name := 'Done';
770 l_actions(0).text := wf_core.translate('DONE');
771 l_actions(0).actiontype := 'function';
772 l_actions(0).action := 'top.main.cancelPage()'; -- put your own commands here
773 l_actions(0).targetframe := 'main';
774 l_actions(0).enabled := 'b_enabled';
775 l_actions(0).gap := 'b_narrow_gap';
776
777 l_actions(1).name := 'Save';
778 l_actions(1).text := wf_core.translate('SAVE');
779 l_actions(1).actiontype := 'function';
780 l_actions(1).action := 'top.main.saveOrder()'; -- put your own commands here
781 l_actions(1).targetframe := 'main';
782 l_actions(1).enabled := 'b_enabled';
783 l_actions(1).gap := 'b_narrow_gap';
784
785 l_actions(2).name := 'New';
786 l_actions(2).text := wf_core.translate('NEW');
787 l_actions(2).actiontype := 'function';
788 l_actions(2).action := 'top.main.createNew()'; -- put your own commands here
789 l_actions(2).targetframe := 'main';
790 l_actions(2).enabled := 'b_enabled';
791 l_actions(2).gap := 'b_narrow_gap';
792
793 l_actions(3).name := 'CopyPage';
794 l_actions(3).text := wf_core.translate('COPY');
795 l_actions(3).actiontype := 'function';
796 l_actions(3).action := 'top.main.Copy()'; -- put your own commands here
797 l_actions(3).targetframe := 'main';
798 l_actions(3).enabled := 'b_enabled';
799 l_actions(3).gap := 'b_narrow_gap';
800
801 l_actions(4).name := 'EditPage';
802 l_actions(4).text := wf_core.translate('EDIT');
803 l_actions(4).actiontype := 'function';
804 l_actions(4).action := 'top.main.Edit()'; -- put your own commands here
805 l_actions(4).targetframe := 'main';
806 l_actions(4).enabled := 'b_enabled';
807 l_actions(4).gap := 'b_narrow_gap';
808
809 l_actions(5).name := 'RenamePage';
810 l_actions(5).text := wf_core.translate('RENAME');
811 l_actions(5).actiontype := 'function';
812 l_actions(5).action := 'top.main.Rename()'; -- put your own commands here
813 l_actions(5).targetframe := 'main';
814 l_actions(5).enabled := 'b_enabled';
815 l_actions(5).gap := 'b_narrow_gap';
816
817 l_actions(6).name := 'DeletePage';
818 l_actions(6).text := wf_core.translate('DELETE');
819 l_actions(6).actiontype := 'function';
820 l_actions(6).action := 'top.main.Delete()'; -- put your own commands here
821 l_actions(6).targetframe := 'main';
822 l_actions(6).enabled := 'b_enabled';
823 l_actions(6).gap := 'b_narrow_gap';
824
825 icx_cabo.buttons(l_actions);
826
827 htp.bodyClose;
828 htp.htmlClose;
829
830 exception
831 when others then
832 htp.p(SQLERRM);
833
834 end PageList;
835
836
837 procedure EditPageList is
838
839 l_title varchar2(80);
840 l_helpmsg varchar2(2000);
841 l_helptitle varchar2(240);
842 l_actions icx_cabo.actionTable;
843 l_toolbar icx_cabo.toolbar;
844 username varchar2(30);
845
846 begin
847
848 -- Check session and current user
849 wfa_sec.GetSession(username);
850 username := upper(username);
851
852 htp.headopen;
853 htp.p('<SCRIPT>');
854
855 icx_admin_sig.help_win_script('PAGEADM', null, 'FND');
856
857 htp.p('</SCRIPT>');
858 htp.headclose;
859
860 l_toolbar.title := wf_core.translate ('MAINTAIN_PAGES');
861 l_toolbar.help_url := 'javascript:top.help_window()';
862 fnd_message.set_name('ICX','ICX_HELP');
863 l_toolbar.help_mouseover := FND_MESSAGE.GET;
864 l_toolbar.custom_option1_url := icx_plug_utilities.getPLSQLagent ||
865 'OracleMyPage.Home';
866 l_toolbar.custom_option1_mouseover := wf_core.translate ('RETURN_TO_HOME');
867 l_toolbar.custom_option1_gif := '/OA_MEDIA/FNDHOME.gif';
868 l_toolbar.custom_option1_mouseover_gif := '/OA_MEDIA/FNDHOME.gif';
869
870 l_helpmsg := wf_core.translate ('ICX_ADMIN_HELP');
871 l_helptitle := wf_core.translate ('MAINTAIN_PAGES');
872
873 icx_cabo.container(p_toolbar => l_toolbar,
874 p_helpmsg => l_helpmsg,
875 p_helptitle => l_helptitle,
876 p_url => owa_util.get_cgi_env('SCRIPT_NAME')||'/ICX_DEFINE_PAGES.PageList',
877 p_action => TRUE);
878
879 end EditPageList;
880
881 end ICX_DEFINE_PAGES;