[Home] [Help]
PACKAGE BODY: APPS.FND_APPLET_LAUNCHER
Source
1 package body fnd_applet_launcher as
2 /* $Header: AFAPPLTB.pls 120.1.12020000.3 2012/12/18 10:18:31 absandhw ship $ */
3
4
5 -------------------------------------------------------------------------
6 -- launch
7 -- Construct the page to launch the specified applet.
8 -------------------------------------------------------------------------
9 procedure launch(
10 applet_class in varchar2,
11 archive_list in varchar2,
12 user_args in varchar2,
13 title_msg in varchar2 default null,
14 title_app in varchar2 default null,
15 height in number default 300,
16 width in number default 400,
17 cache in varchar2 default 'off',
18 validate_session in boolean default TRUE)
19 is
20 client_browser varchar2(40) := null;
21 title varchar2(2000) := null;
22 fullargs varchar2(2000) := null;
23 url varchar2(2000) := null;
24 fail exception;
25 begin
26
27 if (launch.validate_session = TRUE) then
28 if (icx_sec.validateSession = FALSE) then
29 return;
30 end if;
31 end if;
32
33 -----------------------------------------
34 -- Retrieve ICX_FORMS_LAUNCHER profile --
35 -----------------------------------------
36 url := fnd_profile.value('ICX_FORMS_LAUNCHER');
37
38 if (url is null) then
39 fnd_message.set_name('FND', 'PROFILES-CANNOT READ');
40 fnd_message.set_token('OPTION', 'ICX_FORMS_LAUNCHER');
41 fnd_message.set_token('ROUTINE', 'Fnd_Applet_Launcher.Launch');
42 raise fail;
43 end if;
44
45 if (instr(url,'?') = 0)
46 then url := url||'?';
47 end if;
48
49 ----------------------------------------
50 -- Retrieve applet title if specified --
51 ----------------------------------------
52 title := '';
53 if ((title_msg is not null) AND (title_app is not null)) then
54 title := wfa_html.conv_special_url_chars(fnd_Message.get_string
55 (title_app, title_msg));
56 end if;
57
58 fullargs := '&appletmode=nonforms&HTMLpageTitle='||title||
59 '&HTMLpreApplet='||title||'&code='||
60 launch.applet_class||'&width='||width||'&height='||height||
61 '&archive='||launch.archive_list||
62 '&gp14=jinit_appletcache&gv14='||launch.cache||
63 'jinit_appletcache='||launch.cache||'';
64
65 if (launch.validate_session = TRUE) then
66 fullargs := fullargs||'&gp15=icx_ticket&gv15='||
67 fnd_gfm.one_time_use_store(icx_sec.GetSessionCookie(),300,'FORMS_APPLET')||'';
68 end if;
69
70 fullargs := fullargs||launch.user_args;
71
72 url := url||fullargs;
73
74 owa_util.redirect_url(url);
75
76 end launch;
77
78 -------------------------------------------------------------------------
79 -- launch_application
80 -- Construct the page to launch the RunAppApplet applet
81 -- which launches the specified Windows application.
82 -------------------------------------------------------------------------
83 procedure launch_application(
84 application_name in varchar2,
85 title_msg in varchar2 default null,
86 title_app in varchar2 default null)
87 is
88 begin
89 launch(applet_class => 'oracle/apps/fnd/util/RunAppApplet.class',
90 archive_list => '/OA_JAVA/oracle/apps/fnd/jar/fndutil.jar',
91 user_args => '&gp1=app&gv1='||application_name||
92 '&gp2=dbc&gv2='||fnd_web_config.database_id||
93 '&gp3=eul&gv3='||fnd_profile.value('ICX_DEFAULT_EUL'),
94 title_msg => title_msg,
95 title_app => title_app);
96
97 end launch_application;
98
99 end fnd_applet_launcher;