create or replace package body efnow250$js$nepg is -------------------------------------------------------------------------------- -- Name: efnow250$js$nepg.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, RL_REQUERY_BUT_ACTION in varchar2, LOV_FRAME in varchar2) is begin if not caco_security.security_check('efnow250$nepg') then return; end if; htp.p(WSGJSL.OpenScript); htp.p('var index = 0;'); htp.p( 'var DataChangeErrors = false;' ); htp.p( 'var DataChange = false;' ); htp.p( 'var P_0 = new Array();' ); htp.p( 'P_0[0] = "' || WSGL.EscapeURLParam(to_char(efnow250$nepg.CURR_VAL.NEPG_ID)) || '";' ); htp.p(WSGJSL.RtnNotNull); htp.p(WSGJSL.RtnCheckModified); htp.p(WSGJSL.RtnRevertForm); htp.p(WSGJSL.OpenEvent('NEPG','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.CloseScript); exception when others then WSGL.DisplayMessage(WSGL.MESS_EXCEPTION, SQLERRM, ''||' : '||'#Maintain Network Point Groups#3900#', VF_BODY_ATTRIBUTES, 'efnow250$js$nepg.CreateViewJavaScript'); end; -------------------------------------------------------------------------------- -- Name: efnow250$js$nepg.CreateQueryJavaScript -- -- Description: -- -- Parameters: -- -------------------------------------------------------------------------------- procedure CreateQueryJavaScript ( LOV_FRAME in varchar2, QF_BODY_ATTRIBUTES in varchar2) is begin if not caco_security.security_check('efnow250$nepg') then return; end if; htp.p(WSGJSL.OpenScript); htp.p('var FormType = "Query";'); WSGJSL.Output_Invoke_CAL_JS ('efnow250$nepg', 'scrollbars=no,resizable=no,width=320,height=350'); htp.p(WSGJSL.OpenEvent('NEPG','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 Network Point Groups#3900#', QF_BODY_ATTRIBUTES, 'efnow250$js$nepg.CreateQueryJavaScript'); end; -------------------------------------------------------------------------------- -- Name: efnow250$js$nepg.CreateListJavaScript -- -- Description: -- -- Parameters: -- -------------------------------------------------------------------------------- procedure CreateListJavaScript ( RL_BODY_ATTRIBUTES in varchar2) is begin if not caco_security.security_check('efnow250$nepg') then return; end if; htp.p(WSGJSL.OpenScript); htp.p('var FormType = "List";'); htp.p( 'var P_0 = new Array();' ); htp.p(WSGJSL.OpenEvent('AI_NEW_NEPG','OnClick')); htp.p( ' // AI_NEW_NEPG_OnClick // // location.href = "efnow250$.nepg_startup";'); htp.p(WSGJSL.CloseEvent); htp.p(WSGJSL.CloseScript); exception when others then WSGL.DisplayMessage(WSGL.MESS_EXCEPTION, SQLERRM, ''||' : '||'#Maintain Network Point Groups#3900#', RL_BODY_ATTRIBUTES, 'efnow250$js$nepg.CreateListJavaScript'); end; end; /