The following lines contain the word 'select', 'insert', 'update' or 'delete':
select nvl(max(sequence_number),1)
into l_sequence_number
from icx_pages
where user_id = icx_sec.g_user_id;
select icx_pages_s.nextval
into l_page_id
from sys.dual;
ICX_PAGES_PKG.INSERT_ROW(
x_rowid => l_rowid,
x_page_id => l_page_id,
x_page_code => 'ICX_PAGE_' || to_char(l_page_id),
x_main_region_id => l_main_region_id,
x_sequence_number => l_sequence_number + 1,
x_page_type => upper(p_page_type),
x_user_id => icx_sec.g_user_id,
x_refresh_rate => null,
x_page_name => substrb(p_page_name,1,80),
x_page_description => p_page_description,
x_creation_date => sysdate,
x_created_by => icx_sec.g_user_id,
x_last_update_date => sysdate,
x_last_updated_by => icx_sec.g_user_id,
x_last_update_login => icx_sec.g_user_id);
update icx_sessions
set page_id = l_page_id
where session_id = icx_sec.g_session_id;
select icx_page_plugs_s.nextval
into l_plug_id
from sys.dual;
select function_id, user_function_name
into l_function_id, l_display_name
from fnd_form_functions_vl
where function_name = 'ICX_NAVIGATE_PLUG';
exception deletes the page and
informs the user. */
EXCEPTION --added 1378862 mputman
when NO_DATA_FOUND then
RAISE e_nls_not_installed;
insert into icx_page_plugs
(plug_id,
page_id,
display_sequence,
responsibility_id,
menu_id,
entry_sequence,
display_name,
region_id,
last_update_date,
last_updated_by,
creation_date,
created_by)
values(
l_plug_id,
l_page_id,
0,
-1,
-1,
l_function_id,
l_display_name,
l_main_region_id,
sysdate, icx_sec.g_user_id,
sysdate, icx_sec.g_user_id);
deletepage(l_page_id);
select nvl(max(sequence_number),1)
into l_sequence_number
from icx_pages
where user_id = icx_sec.g_user_id;
select main_region_id
into l_from_main_region_id
from icx_pages
where page_id = p_page_id;
select icx_pages_s.nextval
into l_to_page_id
from sys.dual;
ICX_PAGES_PKG.INSERT_ROW(
x_rowid => l_rowid,
x_page_id => l_to_page_id,
x_page_code => 'ICX_PAGE_' || to_char(l_to_page_id),
x_main_region_id => l_to_main_region_id,
x_sequence_number => l_sequence_number + 1,
x_page_type => 'USER',
x_user_id => icx_sec.g_user_id,
x_refresh_rate => null,
x_page_name => p_page_name,
x_page_description => null,
x_creation_date => sysdate,
x_created_by => icx_sec.g_user_id,
x_last_update_date => sysdate,
x_last_updated_by => icx_sec.g_user_id,
x_last_update_login => icx_sec.g_user_id);
update icx_sessions
set page_id = l_to_page_id
where session_id = icx_sec.g_session_id;
update icx_pages_tl
set page_name = p_page_name
where page_id = p_page_id
and language = userenv('LANG');
update icx_pages
set page_name = p_page_name
where page_id = p_page_id;
procedure deletePagePrivate(p_region_id in number) is
l_region_child_count number;
for x in (select * from icx_regions where parent_region_id = p_region_id) loop
deletePagePrivate(x.region_id);
delete from icx_regions
where region_id = p_region_id;
end deletePagePrivate;
procedure deletePage (p_page_id in number) is
l_main_region_id number;
select *
from icx_page_plugs
where page_id = p_page_id;
select main_region_id
into l_main_region_id
from icx_pages
where page_id = p_page_id;
select page_id
into l_current_page_id -- id for the page user has active on OracleMyPage
from icx_sessions
where session_id = icx_sec.g_session_id;
deletePagePrivate(l_main_region_id); -- deletes all child regions
select WEB_HTML_CALL
into l_web_html_call
from FND_FORM_FUNCTIONS a,
FND_MENU_ENTRIES b
where b.MENU_ID = thisplug.MENU_ID
and a.FUNCTION_ID = b.FUNCTION_ID
and b.ENTRY_SEQUENCE = thisplug.entry_sequence;
delete from icx_page_plugs
where page_id = p_page_id;
delete from icx_pages
where page_id = p_page_id;
delete from icx_pages_tl
where page_id = p_page_id;
if (l_current_page_id = p_page_id) then --the page the user was on has been deleted
--return to the Main Page.
begin
select page_id into l_main_page_id
from icx_pages
where page_type = 'MAIN'
and user_id = icx_sec.g_user_id;
update icx_sessions
set page_id = l_main_page_id
where session_id = icx_sec.g_session_id;
end deletePage;
select page_id
into l_page_id
from icx_sessions
where session_id = icx_sec.g_session_id;
select page_name
into l_page_name
from icx_pages_tl
where page_id = l_page_id
and language = userenv('LANG');
select main_region_id
into l_main_region_id
from icx_pages
where page_id = p_page_id;
htp.p (' function deleteRegion(url) {
location.href = url;
update icx_sessions
set page_id = p_page_id
where session_id = icx_sec.g_session_id;
select ipp.plug_id,
nvl(ipp.DISPLAY_NAME, fme.PROMPT) portlet_name,
fff.function_id,
fff.web_html_call,
ipp.display_sequence,
fme.menu_id
from icx_page_plugs ipp,
fnd_menu_entries_vl fme,
fnd_form_functions fff
where ipp.region_id = p_region.region_id
and ipp.page_id = p_page_id
and ipp.menu_id = fme.menu_id
and ipp.entry_sequence = fme.entry_sequence
and fff.function_id = fme.function_id
union all
select b.PLUG_ID,
nvl(b.DISPLAY_NAME,a.USER_FUNCTION_NAME) portlet_name,
a.function_id,
a.web_html_call,
b.display_sequence,
b.menu_id
from FND_FORM_FUNCTIONS_VL a,
ICX_PAGE_PLUGS b
where b.PAGE_ID = p_page_id
and b.MENU_ID = -1
and b.ENTRY_SEQUENCE = a.FUNCTION_ID
and a.type in ('WWL','WWLG', 'WWR', 'WWRG')
and b.region_id = p_region.region_id
order by 5; --mputman fix 2632382
l_str := l_str || ('');
--insert into icx_testing values ('v portlet name ====> ' || rec.portlet_name);
l_url := ''||l_agent||'OracleConfigure.delete_region'||'?p_region_id='||p_region_id||'&'||'p_page_id='||p_page_id;
l_str := l_str || '';
var v_border = document.editregionform.p_region_border.options[document.editregionform.p_region_border.selectedIndex].value;
htp.formSelectOpen(cname => 'p_region_border');
htp.p('
htp.p('
htp.formSelectClose;
procedure delete_region
(
p_region_id in number
, p_page_id in number
)
is
begin
-- Delete the Region
begin
icx_api_region.delete_region(p_region_id);
end delete_region;
select nvl(ipp.DISPLAY_NAME, fme.PROMPT)
into l_plug_name
from icx_page_plugs ipp,
fnd_menu_entries_vl fme,
fnd_form_functions fff
where ipp.plug_id = p_plug_id
and ipp.menu_id = fme.menu_id
and ipp.entry_sequence = fme.entry_sequence
and fff.function_id = fme.function_id;
select nvl(b.DISPLAY_NAME,a.USER_FUNCTION_NAME)
into l_plug_name
from FND_FORM_FUNCTIONS_VL a,
ICX_PAGE_PLUGS b
where b.plug_id = p_plug_id
and b.MENU_ID = -1
and b.ENTRY_SEQUENCE = a.FUNCTION_ID;
update icx_page_plugs
set display_name = p_plug_name
where plug_id = p_plug_id;
select b.responsibility_application_id,
b.security_group_id,
a.responsibility_id,
a.responsibility_name,
a.menu_id,
c.entry_sequence,
c.prompt,
c.description,
d.function_id,
d.type
from fnd_form_functions d,
fnd_menu_entries_vl c,
fnd_responsibility_vl a,
FND_USER_RESP_GROUPS b
where b.user_id = icx_sec.g_user_id
and b.start_date <= sysdate
and (b.end_date is null or b.end_date > sysdate)
and b.RESPONSIBILITY_application_id = a.application_id
and b.responsibility_id = a.responsibility_id
and a.version = 'W'
and a.start_date <= sysdate
and (a.end_date is null or a.end_date > sysdate)
and a.menu_id = c.menu_id
and c.grant_flag = 'Y'
and c.function_id = d.function_id
and d.type in ('WWL','WWLG','WWR','WWRG')
and c.prompt is not null
order by prompt;
cursor selections is
select fff.function_id,
ipp.plug_id,
nvl(ipp.DISPLAY_NAME, fme.PROMPT) plug_name,
fff.web_html_call,
ipp.display_sequence
from icx_page_plugs ipp,
fnd_menu_entries_vl fme,
fnd_form_functions fff
where ipp.region_id = p_region_id
and ipp.page_id = p_page_id
and ipp.menu_id = fme.menu_id
and ipp.entry_sequence = fme.entry_sequence
and fff.function_id = fme.function_id
union
select a.function_id,
b.PLUG_ID,
nvl(b.DISPLAY_NAME,a.USER_FUNCTION_NAME) plug_name,
a.web_html_call,
b.display_sequence
from FND_FORM_FUNCTIONS_VL a,
ICX_PAGE_PLUGS b
where b.PAGE_ID = p_page_id
and b.MENU_ID = -1
and b.ENTRY_SEQUENCE = a.FUNCTION_ID
and a.type in ('WWL','WWLG', 'WWR', 'WWRG')
and b.region_id = p_region_id
order by 5;
icx_javascript.delete_blank_row;
icx_javascript.select_all;
icx_javascript.unselect_all;
document.addPlugdlg.p_selectedlist.value = "";
for (var i = 0; i <= document.addPlugdlg.p_rightselect.length - 1; i++){
if (document.addPlugdlg.p_rightselect.options[i].value != "")
{
document.addPlugdlg.p_selectedlist.value += document.addPlugdlg.p_rightselect.options[i].value;
if (i < document.addPlugdlg.p_rightselect.length - 1 '||'&&'||' document.addPlugdlg.p_rightselect.options[i+1].value != "")
document.addPlugdlg.p_selectedlist.value += ",";
htp.p(' url = "'||l_agent||'OracleConfigure.savepage?p_region_id="+document.addPlugdlg.p_region_id.value+"'||'&'||'p_page_id="+document.addPlugdlg.p_page_id.value+"'||'&'||'p_selectedlist="+document.addPlugdlg.p_selectedlist.value;
for selected_portlets in selections loop
l_rightids(l_index) := '*' || selected_portlets.plug_id;
l_rightnames (l_index) := selected_portlets.plug_name;
icx_page_widget.buildselectboxes(
p_leftnames => l_leftnames,
p_leftids => l_leftids,
p_rightnames => l_rightnames,
p_rightids => l_rightids,
p_pageid => p_page_id,
p_regionid => p_region_id
);
p_selectedlist in varchar2
)
as
l_rightids icx_api_region.array := icx_api_region.empty;
for x in (select * from icx_page_plugs where region_id = p_region_id) loop
l_oldrightids(l_index) := '*' || x.plug_id;
l_rightids := OracleConfigure.csvtoarray(p_selectedlist);
if l_rightids(j) = l_oldrightids(i) then --plug is still in selections do not delete
l_preserve_plug := TRUE;
if (not l_preserve_plug) then --plug is no longer in the selections, delete it
delete from icx_page_plugs
where plug_id = substr(l_oldrightids(i), 2, length(l_oldrightids(i)) );
delete from icx_custom_menu_entries
where plug_id = substr(l_oldrightids(i), 2, length(l_oldrightids(i)) );
updatePlugSequence(substr(l_rightids(k), instr(l_rightids(k),'*',1,1) + 1, length(l_rightids(k)) )
, k);
select c.prompt
into l_display_name
from fnd_menu_entries_vl c
where c.menu_id = p_menu_id
and c.entry_sequence = p_entry_sequence;
select icx_page_plugs_s.nextval into l_plug_id from dual;
insert into ICX_PAGE_PLUGS
(PLUG_ID,
PAGE_ID,
DISPLAY_SEQUENCE,
RESPONSIBILITY_APPLICATION_ID,
SECURITY_GROUP_ID,
RESPONSIBILITY_ID,
MENU_ID,
ENTRY_SEQUENCE,
DISPLAY_NAME,
REGION_ID)
values
(l_plug_id,
p_page_id,
p_display_sequence,
p_resp_appl_id,
p_security_group_id,
p_responsibility_id,
p_menu_id,
p_entry_sequence,
l_display_name,
p_region_id);
procedure updatePlugsequence(
p_instanceid in number,
p_display_sequence in number)
as
begin
begin
update icx_page_plugs set display_sequence = p_display_sequence
where plug_id = p_instanceid;
end updatePlugsequence;
procedure deletePlugInstance(p_instanceid in number,
p_page_id in number,
p_web_html_call in varchar2 )
as
l_web_html_call VARCHAR2(400);
SELECT web_html_call
INTO l_web_html_call
FROM fnd_form_functions
WHERE function_id=p_web_html_call;
delete from icx_page_plugs where plug_id = p_instanceid;
end deletePlugInstance;