115 lines
3.8 KiB
Plaintext
115 lines
3.8 KiB
Plaintext
create or replace package body amfrw030$js$bbme is
|
|
|
|
|
|
--------------------------------------------------------------------------------
|
|
-- Name: amfrw030$js$bbme.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,
|
|
LOV_FRAME in varchar2) is
|
|
begin
|
|
if not caco_security.security_check('amfrw030$bbme') then
|
|
return;
|
|
end if;
|
|
|
|
htp.p(WSGJSL.OpenScript);
|
|
htp.p('var index = 0;');
|
|
htp.p( 'var DataChangeErrors = false;' );
|
|
htp.p( 'var DataChange = false;' );
|
|
|
|
if to_char(amfrw030$mere.CURR_VAL.BUBM_ID) is not null then
|
|
htp.p( 'var P_BUBM_ID = new Array();' );
|
|
htp.p( 'P_BUBM_ID[0] = "' || WSGL.EscapeURLParam(to_char(amfrw030$mere.CURR_VAL.BUBM_ID)) || '";' );
|
|
end if;
|
|
htp.p( 'var P_4 = new Array();' );
|
|
htp.p( 'P_4[0] = "' || WSGL.EscapeURLParam(nvl(to_char(amfrw030$mere.CURR_VAL.BUBM_ID), '')) || '";' );
|
|
htp.p( 'var P_5 = new Array();' );
|
|
htp.p( 'P_5[0] = "' || WSGL.EscapeURLParam(nvl(to_char(amfrw030$mere.CURR_VAL.SYUS_ID), '')) || '";' );
|
|
htp.p( 'var BBME_CHK_VALUE = new Array();' );
|
|
htp.p( 'BBME_CHK_VALUE[0] = ' || to_char(WSGL.Checksum(''|| to_char(amfrw030$mere.CURR_VAL.BUBM_ID)|| to_char(amfrw030$mere.CURR_VAL.BUBM_ID)|| to_char(amfrw030$mere.CURR_VAL.SYUS_ID))) || ';' );
|
|
|
|
htp.p( 'var P_12 = new Array();' );
|
|
|
|
htp.p(WSGJSL.RtnCheckModified);
|
|
htp.p(WSGJSL.RtnRevertForm);
|
|
htp.p(WSGJSL.RtnFindTargetFrame);
|
|
|
|
|
|
htp.p('
|
|
function ResetRadios( form, num_rows )
|
|
{
|
|
return;
|
|
};
|
|
');
|
|
|
|
htp.p(WSGJSL.OpenEvent('BBME','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(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('AI_BACK','OnClick'));
|
|
htp.p('
|
|
var TargetFrame = JSLFindTargetFrame( "_top");
|
|
var Url = "AMFRW030$MERE.startup?Z_FORM=QUERY&Z_CHK=0";
|
|
if (TargetFrame)
|
|
{
|
|
TargetFrame.location = Url;
|
|
}
|
|
else
|
|
{
|
|
location = Url;
|
|
}
|
|
return false;');
|
|
|
|
htp.p(WSGJSL.CloseEvent);
|
|
htp.p(WSGJSL.CloseScript);
|
|
exception
|
|
when others then
|
|
WSGL.DisplayMessage(WSGL.MESS_EXCEPTION, SQLERRM, ''||' : '||'#Read Message#2156#',
|
|
VF_BODY_ATTRIBUTES, 'amfrw030$js$bbme.CreateViewJavaScript');
|
|
end;
|
|
end;
|
|
/
|