git-svn-id: http://locode01.ad.dom/svn/WEBMIP/trunk@50874 248e525c-4dfb-0310-94bc-949c084e9493
This commit is contained in:
302
Data/BulkLoad/EFT/Nominations/plsql/samaw250$js$mtxt.bdy
Normal file
302
Data/BulkLoad/EFT/Nominations/plsql/samaw250$js$mtxt.bdy
Normal file
@@ -0,0 +1,302 @@
|
||||
create or replace package body eft_nom.samaw250$js$mtxt is
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
-- Name: samaw250$js$mtxt.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,
|
||||
RL_REQUERY_BUT_ACTION in varchar2,
|
||||
LOV_FRAME in varchar2) is
|
||||
begin
|
||||
if not caco_security.security_check('samaw250$mtxt') 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_4 = new Array();' );
|
||||
htp.p( 'P_4[0] = "' || WSGL.EscapeURLParam(to_char(samaw250$mtxt.CURR_VAL.MTXT_ID)) || '";' );
|
||||
|
||||
htp.p(WSGJSL.RtnReplace);
|
||||
htp.p(WSGJSL.RtnGetValue);
|
||||
htp.p(WSGJSL.RtnStripMask);
|
||||
htp.p(WSGJSL.RtnToNumber);
|
||||
htp.p(WSGJSL.RtnChkNumScale);
|
||||
htp.p(WSGJSL.RtnNotNull);
|
||||
htp.p(WSGJSL.RtnChkMaxLength);
|
||||
htp.p(WSGJSL.RtnCheckModified);
|
||||
htp.p(WSGJSL.RtnRevertForm);
|
||||
htp.p(WSGJSL.RtnFlagRow);
|
||||
htp.p(WSGJSL.OpenEvent('MTXT','Validate'));htp.p('var index = 0;');
|
||||
|
||||
htp.p(WSGJSL.CallNotNull('ctl.form.P_TEXT_NUMBER[index]', WSGL.MsgGetText(219, WSGLM.MSG219_MISSING_MANDATORY, '#Text Number#16#:')));
|
||||
|
||||
htp.p(WSGJSL.CallNotNull('ctl.form.P_TEXT[index]', WSGL.MsgGetText(219, WSGLM.MSG219_MISSING_MANDATORY, '#Text#15#:')));
|
||||
htp.p(WSGJSL.CallChkMaxLength('ctl.form.P_TEXT[index]', 500, WSGL.MsgGetText(230, WSGLM.MSG230_MAXLEN_ERROR, '#Text#15#:', '500')
|
||||
));
|
||||
|
||||
htp.p(WSGJSL.CloseEvent);
|
||||
htp.p(WSGJSL.OpenEvent('MTXT','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 (!MTXT_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, '#Module Text#13#'||' : '||'#Module Text#13#',
|
||||
VF_BODY_ATTRIBUTES, 'samaw250$js$mtxt.CreateViewJavaScript');
|
||||
end;
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
-- Name: samaw250$js$mtxt.CreateInsertJavaScript
|
||||
--
|
||||
-- Description:
|
||||
--
|
||||
-- Parameters:
|
||||
--
|
||||
--------------------------------------------------------------------------------
|
||||
procedure CreateInsertJavaScript(
|
||||
IF_ROWS_INSERTED in integer,
|
||||
IF_ROWS_ERROR in integer,
|
||||
IF_BODY_ATTRIBUTES in varchar2,
|
||||
RL_REQUERY_BUT_ACTION in varchar2,
|
||||
LOV_FRAME in varchar2) is
|
||||
begin
|
||||
if not caco_security.security_check('samaw250$mtxt') 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.RtnReplace);
|
||||
htp.p(WSGJSL.RtnGetValue);
|
||||
htp.p(WSGJSL.RtnStripMask);
|
||||
htp.p(WSGJSL.RtnToNumber);
|
||||
htp.p(WSGJSL.RtnChkNumScale);
|
||||
htp.p(WSGJSL.RtnNotNull);
|
||||
htp.p(WSGJSL.RtnChkMaxLength);
|
||||
htp.p(WSGJSL.RtnCheckModified);
|
||||
htp.p(WSGJSL.RtnRevertForm);
|
||||
htp.p(WSGJSL.RtnFlagRow);
|
||||
htp.p(WSGJSL.OpenEvent('MTXT','Validate'));htp.p('var index = 0;');
|
||||
|
||||
|
||||
htp.p(WSGJSL.CallNotNull('ctl.form.P_TEXT_NUMBER[index]', WSGL.MsgGetText(219, WSGLM.MSG219_MISSING_MANDATORY, '#Text Number#16#:')));
|
||||
|
||||
|
||||
htp.p(WSGJSL.CallNotNull('ctl.form.P_TEXT[index]', WSGL.MsgGetText(219, WSGLM.MSG219_MISSING_MANDATORY, '#Text#15#:')));
|
||||
htp.p(WSGJSL.CallChkMaxLength('ctl.form.P_TEXT[index]', 500, WSGL.MsgGetText(230, WSGLM.MSG230_MAXLEN_ERROR, '#Text#15#:', '500')
|
||||
));
|
||||
|
||||
htp.p(WSGJSL.CloseEvent);
|
||||
htp.p(WSGJSL.OpenEvent('MTXT','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 (!MTXT_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, '#Module Text#13#'||' : '||'#Module Text#13#',
|
||||
IF_BODY_ATTRIBUTES, 'samaw250$js$mtxt.CreateInsertJavaScript');
|
||||
end;
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
-- Name: samaw250$js$mtxt.CreateQueryJavaScript
|
||||
--
|
||||
-- Description:
|
||||
--
|
||||
-- Parameters:
|
||||
--
|
||||
--------------------------------------------------------------------------------
|
||||
procedure CreateQueryJavaScript (
|
||||
LOV_FRAME in varchar2,
|
||||
QF_BODY_ATTRIBUTES in varchar2)
|
||||
is
|
||||
begin
|
||||
if not caco_security.security_check('samaw250$mtxt') then
|
||||
return;
|
||||
end if;
|
||||
|
||||
htp.p(WSGJSL.OpenScript);
|
||||
htp.p('var FormType = "Query";');
|
||||
|
||||
|
||||
htp.p(WSGJSL.OpenEvent('MTXT','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, '#Module Text#13#'||' : '||'#Module Text#13#',
|
||||
QF_BODY_ATTRIBUTES, 'samaw250$js$mtxt.CreateQueryJavaScript');
|
||||
end;
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
-- Name: samaw250$js$mtxt.CreateListJavaScript
|
||||
--
|
||||
-- Description:
|
||||
--
|
||||
-- Parameters:
|
||||
--
|
||||
--------------------------------------------------------------------------------
|
||||
procedure CreateListJavaScript (
|
||||
RL_BODY_ATTRIBUTES in varchar2)
|
||||
is
|
||||
begin
|
||||
if not caco_security.security_check('samaw250$mtxt') then
|
||||
return;
|
||||
end if;
|
||||
|
||||
htp.p(WSGJSL.OpenScript);
|
||||
htp.p('var FormType = "List";');
|
||||
|
||||
|
||||
htp.p( 'var P_4 = new Array();' );
|
||||
|
||||
htp.p(WSGJSL.CloseScript);
|
||||
exception
|
||||
when others then
|
||||
WSGL.DisplayMessage(WSGL.MESS_EXCEPTION, SQLERRM, '#Module Text#13#'||' : '||'#Module Text#13#',
|
||||
RL_BODY_ATTRIBUTES, 'samaw250$js$mtxt.CreateListJavaScript');
|
||||
end;
|
||||
end;
|
||||
/
|
||||
|
||||
Reference in New Issue
Block a user