git-svn-id: http://locode01.ad.dom/svn/WEBMIP/trunk@50874 248e525c-4dfb-0310-94bc-949c084e9493
This commit is contained in:
466
Data/BulkLoad/EFT/Nominations/plsql/tamaw060$js$syop.bdy
Normal file
466
Data/BulkLoad/EFT/Nominations/plsql/tamaw060$js$syop.bdy
Normal file
@@ -0,0 +1,466 @@
|
||||
create or replace package body eft_nom.tamaw060$js$syop is
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
-- Name: tamaw060$js$syop.CreateViewJavaScript
|
||||
--
|
||||
-- Description:
|
||||
--
|
||||
-- Parameters:
|
||||
--
|
||||
--------------------------------------------------------------------------------
|
||||
procedure CreateViewJavaScript(
|
||||
VF_ROWS_UPDATED in integer,
|
||||
VF_ROWS_DELETED in integer,
|
||||
VF_ROWS_ERROR in integer,
|
||||
VF_BODY_ATTRIBUTES in varchar2,
|
||||
IF_ROWS_INSERTED in integer,
|
||||
IF_ROWS_ERROR in integer,
|
||||
LOV_FRAME in varchar2) is
|
||||
begin
|
||||
if not caco_security.security_check('tamaw060$syop') then
|
||||
return;
|
||||
end if;
|
||||
|
||||
htp.p(WSGJSL.OpenScript);
|
||||
htp.p('var index = 0;');
|
||||
if IF_ROWS_INSERTED > 0 then
|
||||
htp.p( 'var DataChange = true;' );
|
||||
else
|
||||
htp.p( 'var DataChange = false;' );
|
||||
end if;
|
||||
if IF_ROWS_ERROR > 0 then
|
||||
htp.p( 'var DataChangeErrors = true;' );
|
||||
else
|
||||
htp.p( 'var DataChangeErrors = false;' );
|
||||
end if;
|
||||
|
||||
|
||||
htp.p( 'var P_SYOP_ID = new Array();' );
|
||||
htp.p( 'var P_SYOP_ID = new Array();' );
|
||||
htp.p( 'var P_5 = new Array();' );
|
||||
htp.p( 'var OPPK_CHK_VALUE = new Array();' );
|
||||
htp.p( 'var PROP_CHK_VALUE = new Array();' );
|
||||
|
||||
htp.p(WSGJSL.RtnNotNull);
|
||||
htp.p(WSGJSL.RtnChkMaxLength);
|
||||
htp.p(WSGJSL.RtnReplace);
|
||||
htp.p(WSGJSL.RtnGetValue);
|
||||
htp.p(WSGJSL.RtnStripMask);
|
||||
htp.p(WSGJSL.RtnToNumber);
|
||||
htp.p(WSGJSL.RtnChkNumScale);
|
||||
htp.p(WSGJSL.RtnCheckModified);
|
||||
htp.p(WSGJSL.RtnRevertForm);
|
||||
htp.p(WSGJSL.RtnFlagRow);
|
||||
htp.p(WSGJSL.OpenEvent('NAME','OnChange')); htp.p('
|
||||
if (ctl != null)
|
||||
{
|
||||
ctl.form.z_modified[index].value = "Y";
|
||||
}');
|
||||
htp.p(WSGJSL.CloseEvent);
|
||||
tamaw060$syop.InitialiseDomain('OPTION_TYPE');
|
||||
|
||||
htp.p('
|
||||
function ResetRadios( form, num_rows )
|
||||
{
|
||||
return;
|
||||
};
|
||||
');
|
||||
|
||||
htp.p(WSGJSL.OpenEvent('MODULE_NAME','OnChange')); htp.p('
|
||||
if (ctl != null)
|
||||
{
|
||||
ctl.form.z_modified[index].value = "Y";
|
||||
}');
|
||||
htp.p(WSGJSL.CloseEvent);
|
||||
htp.p(WSGJSL.OpenEvent('DESCRIPTION','OnChange')); htp.p('
|
||||
if (ctl != null)
|
||||
{
|
||||
ctl.form.z_modified[index].value = "Y";
|
||||
}');
|
||||
htp.p(WSGJSL.CloseEvent);
|
||||
htp.p(WSGJSL.OpenEvent('OPTION_TYPE','OnChange')); htp.p('
|
||||
if (ctl != null)
|
||||
{
|
||||
ctl.form.z_modified[index].value = "Y";
|
||||
}');
|
||||
htp.p(WSGJSL.CloseEvent);
|
||||
htp.p(WSGJSL.OpenEvent('SYOP_ID_THE_PARENT_OF','LOV')); htp.p('
|
||||
var depStr = "";
|
||||
var modeStr = ""
|
||||
if (index == null)
|
||||
index = 0;
|
||||
if (ctl[index].form.name.search(/VForm$/) == -1)
|
||||
{
|
||||
modeStr = "INS";
|
||||
}
|
||||
else
|
||||
{
|
||||
modeStr = "UPD";
|
||||
}
|
||||
');
|
||||
|
||||
if LOV_FRAME is not null then
|
||||
htp.p(' var lovFra = "'||LOV_FRAME||'";');
|
||||
htp.p(' var winpar = "";');
|
||||
else
|
||||
htp.p(' var lovFra = "winLOV";');
|
||||
htp.p(' var winpar = "scrollbars=yes,resizable=yes,width=400,height=400";');
|
||||
end if;
|
||||
htp.p(' var filterprompt = "";');
|
||||
htp.p('
|
||||
|
||||
var lovTitle = "'||replace('','"','\"')||'";
|
||||
window.current_lov_title = lovTitle;
|
||||
|
||||
JSLOpenLOV( ctl[index], index, modeStr, "tamaw060$syop.syop_id_the_parent_of_lov", depStr, lovFra, winpar, filterprompt );
|
||||
|
||||
');
|
||||
|
||||
htp.p(WSGJSL.CloseEvent);
|
||||
htp.p(WSGJSL.OpenEvent('SYOP_ID_THE_PARENT_OF','OnChange')); htp.p('
|
||||
if (ctl != null)
|
||||
{
|
||||
ctl.form.z_modified[index].value = "Y";
|
||||
}');
|
||||
htp.p(WSGJSL.CloseEvent);
|
||||
htp.p(WSGJSL.OpenEvent('DISPLAY_SEQ','OnChange')); htp.p('
|
||||
if (ctl != null)
|
||||
{
|
||||
ctl.form.z_modified[index].value = "Y";
|
||||
}');
|
||||
htp.p(WSGJSL.CloseEvent);
|
||||
htp.p(WSGJSL.OpenEvent('SYOP','Validate'));htp.p('var index = 0;');
|
||||
htp.p('
|
||||
for (index = 0; index < ctl.form.P_NAME.length; index++)
|
||||
{');
|
||||
htp.p(' if (!(ctl.form.z_modified[index].value == "Y")) { continue;};');
|
||||
htp.p(' if (ctl.form.z_delete[index].checked == true) { continue;};');
|
||||
|
||||
htp.p(WSGJSL.CallNotNull('ctl.form.P_NAME[index]', WSGL.MsgGetText(219, WSGLM.MSG219_MISSING_MANDATORY, '#Name(*)#1090#:'), true));
|
||||
htp.p('
|
||||
}');
|
||||
htp.p('
|
||||
for (index = 0; index < ctl.form.P_MODULE_NAME.length; index++)
|
||||
{');
|
||||
htp.p(' if (!(ctl.form.z_modified[index].value == "Y")) { continue;};');
|
||||
htp.p(' if (ctl.form.z_delete[index].checked == true) { continue;};');
|
||||
|
||||
htp.p('
|
||||
}');
|
||||
htp.p('
|
||||
for (index = 0; index < ctl.form.P_DESCRIPTION.length; index++)
|
||||
{');
|
||||
htp.p(' if (!(ctl.form.z_modified[index].value == "Y")) { continue;};');
|
||||
htp.p(' if (ctl.form.z_delete[index].checked == true) { continue;};');
|
||||
|
||||
htp.p(WSGJSL.CallChkMaxLength('ctl.form.P_DESCRIPTION[index]', 80, WSGL.MsgGetText(230, WSGLM.MSG230_MAXLEN_ERROR, '#Description#20#:', '80')
|
||||
, true));
|
||||
htp.p('
|
||||
}');
|
||||
htp.p('
|
||||
for (index = 0; index < ctl.form.P_DISPLAY_SEQ.length; index++)
|
||||
{');
|
||||
htp.p(' if (!(ctl.form.z_modified[index].value == "Y")) { continue;};');
|
||||
htp.p(' if (ctl.form.z_delete[index].checked == true) { continue;};');
|
||||
|
||||
htp.p('
|
||||
}');
|
||||
|
||||
htp.p(WSGJSL.CloseEvent);
|
||||
htp.p(WSGJSL.OpenEvent('SYOP','OnLoad'));
|
||||
htp.p('
|
||||
if ( FormType != "PostDelete")
|
||||
{
|
||||
form_num=0;
|
||||
do
|
||||
{
|
||||
elem_num=0;
|
||||
len = document.forms[form_num].elements.length;
|
||||
if (len > 0)
|
||||
{
|
||||
while (elem_num < len &&
|
||||
document.forms[form_num].elements[elem_num].type != "text" &&
|
||||
document.forms[form_num].elements[elem_num].type != "textarea")
|
||||
{
|
||||
elem_num++;
|
||||
}
|
||||
if (elem_num < len)
|
||||
{
|
||||
document.forms[form_num].elements[elem_num].focus();
|
||||
break;
|
||||
}
|
||||
}
|
||||
form_num++;
|
||||
} while ( form_num < document.forms.length );
|
||||
}
|
||||
');
|
||||
htp.p(WSGJSL.CloseEvent);
|
||||
htp.p(WSGJSL.OpenEvent('btnVFU','OnClick'));
|
||||
htp.p(' if (!SYOP_Validate(ctl)) { return false; }');
|
||||
htp.p(WSGJSL.StandardSubmit(false));
|
||||
|
||||
htp.p(WSGJSL.CloseEvent);
|
||||
htp.p(WSGJSL.OpenEvent('btnVFD','OnClick'));
|
||||
htp.p(WSGJSL.VerifyDelete(WSGL.MsgGetText(118, WSGLM.DSP118_CONFIRM_DELETE)));
|
||||
htp.p(WSGJSL.CloseEvent);
|
||||
htp.p(WSGJSL.OpenEvent('btnVFR','OnClick'));
|
||||
htp.p(WSGJSL.StandardSubmit(false));
|
||||
|
||||
htp.p(WSGJSL.CloseEvent);
|
||||
htp.p(WSGJSL.OpenEvent('btnVFI','OnClick'));
|
||||
htp.p(WSGJSL.StandardSubmit(false));
|
||||
|
||||
htp.p(WSGJSL.CloseEvent);
|
||||
htp.p(WSGJSL.CloseScript);
|
||||
exception
|
||||
when others then
|
||||
WSGL.DisplayMessage(WSGL.MESS_EXCEPTION, SQLERRM, '#Maintain System Options#1091#'||' : '||'#Maintain System Options#1091#',
|
||||
VF_BODY_ATTRIBUTES, 'tamaw060$js$syop.CreateViewJavaScript');
|
||||
end;
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
-- Name: tamaw060$js$syop.CreateInsertJavaScript
|
||||
--
|
||||
-- Description:
|
||||
--
|
||||
-- Parameters:
|
||||
--
|
||||
--------------------------------------------------------------------------------
|
||||
procedure CreateInsertJavaScript(
|
||||
IF_ROWS_INSERTED in integer,
|
||||
IF_ROWS_ERROR in integer,
|
||||
IF_BODY_ATTRIBUTES in varchar2,
|
||||
LOV_FRAME in varchar2) is
|
||||
begin
|
||||
if not caco_security.security_check('tamaw060$syop') then
|
||||
return;
|
||||
end if;
|
||||
|
||||
htp.p(WSGJSL.OpenScript);
|
||||
htp.p('var FormType = "Insert";');
|
||||
htp.p('var index = 0;');
|
||||
if IF_ROWS_INSERTED > 0 then
|
||||
htp.p( 'var DataChange = true;' );
|
||||
else
|
||||
htp.p( 'var DataChange = false;' );
|
||||
end if;
|
||||
if IF_ROWS_ERROR > 0 then
|
||||
htp.p( 'var DataChangeErrors = true;' );
|
||||
else
|
||||
htp.p( 'var DataChangeErrors = false;' );
|
||||
end if;
|
||||
|
||||
|
||||
htp.p(WSGJSL.RtnNotNull);
|
||||
htp.p(WSGJSL.RtnChkMaxLength);
|
||||
htp.p(WSGJSL.RtnReplace);
|
||||
htp.p(WSGJSL.RtnGetValue);
|
||||
htp.p(WSGJSL.RtnStripMask);
|
||||
htp.p(WSGJSL.RtnToNumber);
|
||||
htp.p(WSGJSL.RtnChkNumScale);
|
||||
htp.p(WSGJSL.RtnCheckModified);
|
||||
htp.p(WSGJSL.RtnRevertForm);
|
||||
htp.p(WSGJSL.RtnFlagRow);
|
||||
htp.p(WSGJSL.OpenEvent('SYOP_ID_THE_PARENT_OF','LOV')); htp.p('
|
||||
var depStr = "";
|
||||
var modeStr = ""
|
||||
if (index == null)
|
||||
index = 0;
|
||||
if (ctl[index].form.name.search(/VForm$/) == -1)
|
||||
{
|
||||
modeStr = "INS";
|
||||
}
|
||||
else
|
||||
{
|
||||
modeStr = "UPD";
|
||||
}
|
||||
');
|
||||
|
||||
if LOV_FRAME is not null then
|
||||
htp.p(' var lovFra = "'||LOV_FRAME||'";');
|
||||
htp.p(' var winpar = "";');
|
||||
else
|
||||
htp.p(' var lovFra = "winLOV";');
|
||||
htp.p(' var winpar = "scrollbars=yes,resizable=yes,width=400,height=400";');
|
||||
end if;
|
||||
htp.p(' var filterprompt = "";');
|
||||
htp.p('
|
||||
|
||||
var lovTitle = "'||replace('','"','\"')||'";
|
||||
window.current_lov_title = lovTitle;
|
||||
|
||||
JSLOpenLOV( ctl[index], index, modeStr, "tamaw060$syop.syop_id_the_parent_of_lov", depStr, lovFra, winpar, filterprompt );
|
||||
|
||||
');
|
||||
|
||||
htp.p(WSGJSL.CloseEvent);
|
||||
htp.p(WSGJSL.OpenEvent('SYOP','Validate'));htp.p('var index = 0;');
|
||||
|
||||
|
||||
htp.p(WSGJSL.CallNotNull('ctl.form.P_NAME[index]', WSGL.MsgGetText(219, WSGLM.MSG219_MISSING_MANDATORY, '#Name(*)#1090#:')));
|
||||
|
||||
|
||||
htp.p(WSGJSL.CallChkMaxLength('ctl.form.P_DESCRIPTION[index]', 80, WSGL.MsgGetText(230, WSGLM.MSG230_MAXLEN_ERROR, '#Description#20#:', '80')
|
||||
));
|
||||
|
||||
|
||||
htp.p(WSGJSL.CloseEvent);
|
||||
htp.p(WSGJSL.OpenEvent('SYOP','OnLoad'));
|
||||
htp.p('
|
||||
if ( FormType != "PostDelete")
|
||||
{
|
||||
form_num=0;
|
||||
do
|
||||
{
|
||||
elem_num=0;
|
||||
len = document.forms[form_num].elements.length;
|
||||
if (len > 0)
|
||||
{
|
||||
while (elem_num < len &&
|
||||
document.forms[form_num].elements[elem_num].type != "text" &&
|
||||
document.forms[form_num].elements[elem_num].type != "textarea")
|
||||
{
|
||||
elem_num++;
|
||||
}
|
||||
if (elem_num < len)
|
||||
{
|
||||
document.forms[form_num].elements[elem_num].focus();
|
||||
break;
|
||||
}
|
||||
}
|
||||
form_num++;
|
||||
} while ( form_num < document.forms.length );
|
||||
}
|
||||
');
|
||||
htp.p(WSGJSL.CloseEvent);
|
||||
htp.p(WSGJSL.OpenEvent('btnIFI','OnClick'));
|
||||
htp.p(' if (!SYOP_Validate(ctl)) { return false; }');
|
||||
htp.p(WSGJSL.StandardSubmit(false));
|
||||
|
||||
htp.p(WSGJSL.CloseEvent);
|
||||
htp.p(WSGJSL.OpenEvent('btnIFR','OnClick'));
|
||||
htp.p(WSGJSL.StandardSubmit(false));
|
||||
|
||||
htp.p(WSGJSL.CloseEvent);
|
||||
htp.p(WSGJSL.CloseScript);
|
||||
exception
|
||||
when others then
|
||||
WSGL.DisplayMessage(WSGL.MESS_EXCEPTION, SQLERRM, '#Maintain System Options#1091#'||' : '||'#Maintain System Options#1091#',
|
||||
IF_BODY_ATTRIBUTES, 'tamaw060$js$syop.CreateInsertJavaScript');
|
||||
end;
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
-- Name: tamaw060$js$syop.CreateQueryJavaScript
|
||||
--
|
||||
-- Description:
|
||||
--
|
||||
-- Parameters:
|
||||
--
|
||||
--------------------------------------------------------------------------------
|
||||
procedure CreateQueryJavaScript (
|
||||
LOV_FRAME in varchar2,
|
||||
QF_BODY_ATTRIBUTES in varchar2)
|
||||
is
|
||||
begin
|
||||
if not caco_security.security_check('tamaw060$syop') then
|
||||
return;
|
||||
end if;
|
||||
|
||||
htp.p(WSGJSL.OpenScript);
|
||||
htp.p('var FormType = "Query";');
|
||||
|
||||
|
||||
htp.p(WSGJSL.RtnOpenLOV);
|
||||
|
||||
htp.p(WSGJSL.OpenEvent('NAME','LOV')); htp.p('
|
||||
var depStr = "";
|
||||
var modeStr = ""
|
||||
index = -1;
|
||||
modeStr = "Q";
|
||||
');
|
||||
|
||||
if LOV_FRAME is not null then
|
||||
htp.p(' var lovFra = "'||LOV_FRAME||'";');
|
||||
htp.p(' var winpar = "";');
|
||||
else
|
||||
htp.p(' var lovFra = "winLOV";');
|
||||
htp.p(' var winpar = "scrollbars=yes,resizable=yes,width=400,height=400";');
|
||||
end if;
|
||||
htp.p(' var filterprompt = "";');
|
||||
htp.p('
|
||||
|
||||
var lovTitle = "'||replace('','"','\"')||'";
|
||||
window.current_lov_title = lovTitle;
|
||||
|
||||
JSLOpenLOV( ctl, index, modeStr, "tamaw060$syop.talv_syop_name_lov", depStr, lovFra, winpar, filterprompt );
|
||||
|
||||
');
|
||||
|
||||
htp.p(WSGJSL.CloseEvent);
|
||||
htp.p(WSGJSL.OpenEvent('MODULE_NAME','LOV')); htp.p('
|
||||
var depStr = "";
|
||||
var modeStr = ""
|
||||
index = -1;
|
||||
modeStr = "Q";
|
||||
');
|
||||
|
||||
if LOV_FRAME is not null then
|
||||
htp.p(' var lovFra = "'||LOV_FRAME||'";');
|
||||
htp.p(' var winpar = "";');
|
||||
else
|
||||
htp.p(' var lovFra = "winLOV";');
|
||||
htp.p(' var winpar = "scrollbars=yes,resizable=yes,width=400,height=400";');
|
||||
end if;
|
||||
htp.p(' var filterprompt = "";');
|
||||
htp.p('
|
||||
|
||||
var lovTitle = "'||replace('','"','\"')||'";
|
||||
window.current_lov_title = lovTitle;
|
||||
|
||||
JSLOpenLOV( ctl, index, modeStr, "tamaw060$syop.talv_syop_module_lov", depStr, lovFra, winpar, filterprompt );
|
||||
|
||||
');
|
||||
|
||||
htp.p(WSGJSL.CloseEvent);
|
||||
htp.p(WSGJSL.OpenEvent('SYOP','OnLoad'));
|
||||
htp.p('
|
||||
if ( FormType != "PostDelete")
|
||||
{
|
||||
form_num=0;
|
||||
do
|
||||
{
|
||||
elem_num=0;
|
||||
len = document.forms[form_num].elements.length;
|
||||
if (len > 0)
|
||||
{
|
||||
while (elem_num < len &&
|
||||
document.forms[form_num].elements[elem_num].type != "text" &&
|
||||
document.forms[form_num].elements[elem_num].type != "textarea")
|
||||
{
|
||||
elem_num++;
|
||||
}
|
||||
if (elem_num < len)
|
||||
{
|
||||
document.forms[form_num].elements[elem_num].focus();
|
||||
break;
|
||||
}
|
||||
}
|
||||
form_num++;
|
||||
} while ( form_num < document.forms.length );
|
||||
}
|
||||
');
|
||||
htp.p(WSGJSL.CloseEvent);
|
||||
htp.p(WSGJSL.OpenEvent('btnQFQ','OnClick'));
|
||||
htp.p(WSGJSL.StandardSubmit(false));
|
||||
|
||||
htp.p(WSGJSL.CloseEvent);
|
||||
htp.p(WSGJSL.CloseScript);
|
||||
exception
|
||||
when others then
|
||||
WSGL.DisplayMessage(WSGL.MESS_EXCEPTION, SQLERRM, '#Maintain System Options#1091#'||' : '||'#Maintain System Options#1091#',
|
||||
QF_BODY_ATTRIBUTES, 'tamaw060$js$syop.CreateQueryJavaScript');
|
||||
end;
|
||||
end;
|
||||
/
|
||||
|
||||
Reference in New Issue
Block a user