create or replace package body odwaupld is /***************************************************************************************** Purpose odwaupld: support for Check In and Check In Dialogs Usage Remarks Revision history When Who Construct Revision What ------------------------------------------------------------------------------------------ $REVISION_HISTORY$ 05-Sep-2003 Kannan Parthasarathy - B3101540: Made changes to uplFormFrame and prepareFileSuccess. 10-Dec-2002 Kannan Parthasarathy - B2627934: Add accept-charset property to HTML forms. 27-Nov-2002 Kannan Parthasarathy - B2531690 and B2539130 Fixed. Added functions fileExists and folderExists to check the Uniqueness constraint. 19-Nov-2002 Kannan Parthasarathy - Fixed OAC P1 Violations. 16-oct-2002 Kannan Parthasarathy - B2615972 fixed. The file element made last one in the upload form. 05-mar-2001 Lucas Jellema 1.8 - issue 221 [odwa project/221%] File Upload in brand new folder loses folder context 02-mar-2001 Lucas Jellema 1.7 - implement Create Folder 26-feb-2001 Lucas Jellema 1.6 - File prompt not in Bold 26-feb-2001 Lucas Jellema 1.5 - function upload_enabled does not currently look at preference servlets_enabled 23-feb-2001 Lucas Jellema 1.4 - issue 208 (refresh folder context after upload of new file in checked in folder) [odwa project/208%] 29-jan-2001 Lucas Jellema 1.3 Have file 'touched' to set correct modified by after upload. Require frames to achieve! Look to odwachki for an example. 21-dec-2000 Lucas Jellema 1.2 Forgotten to save some changes that should have gone into 1.1 20-dec-2000 Lucas Jellema 1.0 Initial creation to support upload of files. *****************************************************************************************/ -- -- private constants -- REVISION_LABEL constant varchar2(30) := '$x.y::1.8 $'; PACKAGE_NAME constant varchar2(30) := 'odwaupld'; -- indicates whether for this instance of ODWA6i the upload of files has been enabled function uploadEnabled return boolean is begin return odwapref.get_value(p_preference_name => 'servlets_enabled') = 'Y'; --false; -- No Servlets available/installed end; -- uploadEnabled -- this function returns the URL that is appropriate for uploading the indicated object function url_upload ( p_ivid in number ) return varchar2 is begin if p_ivid is null -- a new file: uploading and creation! then return htf.anchor ( curl => 'javascript:upl('''')' , ctext => cdwp.add_images('{addition.gif}', p_attributes => ' ALT="'||Rob_msg.GetMsg(Rob_msg.CAP294_ODWAUPLD_CRUPLD,'','','','')||'"') ); else return htf.anchor ( curl => 'javascript:upl('''||to_char(p_ivid)||''')' , ctext => cdwp.add_images('{upload.gif}', p_attributes => ' ALT="'||Rob_msg.GetMsg(Rob_msg.CAP223_ODWARPRT_UPLOAD,'','','','')||'"') ); end if; -- p_ivid is null end; -- url_upload -- this function returns the URL that is appropriate for creating a folder function url_create_folder ( p_parent_folder_ivid in number ) return varchar2 is begin if p_parent_folder_ivid is null -- a new root folder then return htf.anchor ( curl => 'javascript:creFol('''')' , ctext => cdwp.add_images('{addfolder.gif}', p_attributes => ' ALT="'||Rob_msg.GetMsg(Rob_msg.CAP295_ODWAUPLD_CRFOL,'','','','')||'"') ); else return htf.anchor ( curl => 'javascript:creFol('''||to_char(p_parent_folder_ivid)||''')' , ctext => cdwp.add_images('{addfolder.gif}', p_attributes => ' ALT="'||Rob_msg.GetMsg(Rob_msg.CAP296_ODWAUPLD_CRNSFOL,'','','','')||'"') ); end if; -- p_ivid is null end; -- url_create_folder -- this function will write the Javascript function to be included in the HEAD section of the HTML -- page; this function will be called to do a Create Folder request procedure js_crefol_request is begin htp.p (' '); end; -- js_crefol_request -- this function will write the Javascript function to be included in the HEAD section of the HTML -- page; this function will be called to do open the Grant Access on Folder dialog procedure js_grant_request is begin htp.p (' '); end; -- js_crefol_request -- this function will write the Javascript function to be included in the HEAD section of the HTML -- page; this function will be called to do a upload request for object with IVID procedure js_upload_request is begin htp.p (' '); end; -- js_upload_request -- this procedure write a JavaScript function that can be invoked to execute a SQL statement on -- the server procedure js_do_sql is begin htp.p (' '); end; -- js_do_sql --top.opener.refreshForm.submit() procedure js_ok ( p_new_file in boolean default false ) is begin htp.p (' '); end; -- js_ok procedure js_write_button_frame is begin htp.p (' '); end; --js_write_button_frame procedure js_init ( p_error_stack in varchar2 , p_description in varchar2 default null ) is begin htp.p (' '); end; -- js_init procedure js_start_upload ( p_irid in number , p_ivid in number ) is begin htp.p (' '); end; --js_start_upload procedure prepareFileSuccess ( p_session_id in number , p_ivid in number , p_filename in varchar2 ) is l_menu_bar varchar2(4000); l_label varchar2(2000); l_description varchar2(32000); l_buflen number(5); begin odwactxt.update_context ( p_session_id => p_session_id , p_pac_irid => cdwpbase.get_irid( p_ivid) , p_pac_ivid => p_ivid , p_package_name => PACKAGE_NAME , p_procedure_name=> 'uplSuccess' , p_new_request => false ); rmotextp.readall ( ref => cdwpbase.get_irid( p_ivid) , txt_type => 'CDIDSC' , buffer => l_description , buflen => 32000 , bufret => l_buflen ); htp.htmlOpen; htp.headopen; cdwp.write_about(package_name, revision_label); cdwp.include_report_styles; htp.p(''); odwainfo.js_invoke_info; js_start_upload ( p_irid => odwactxt.get_pac_irid , p_ivid => p_ivid ); htp.headClose; htp.bodyopen ( cattributes => 'onLoad="startUpload()' ||'"'); -- include in this frame: -- * link to VHV -- * link to VHV-rev notes -- * link to ODWAINFO cdwp.p ( p_string => Rob_msg.GetMsg(Rob_msg.DSP354_ODWAUPLD_UPLPROC,'','','','') , p_style => 'partitle' ); htp.nl; htp.nl; cdwp.tableOpen; cdwp.tableRowOpen; cdwp.tabledataheading ( cdwp.add_images ('{file.gif}' ) ||Rob_msg.GetMsg(Rob_msg.CAP297_ODWAUPLD_FILE,'','','','') ); cdwp.TableDataValue ( p_filename , p_Attributes => ' VALIGN=BOTTOM ' ); cdwp.tableRowClose; cdwp.tableRowOpen; cdwp.tabledataheading ( cdwp.add_images ('{folder.gif}' ) ||Rob_msg.GetMsg(Rob_msg.CAP075_ODWACHCK_FOLPATH,'','','','') ); cdwp.TableDataValue ( jr_name.get_path( id => odwactxt.get_folder_ivid, format=> 'NAME') , p_Attributes => ' VALIGN=BOTTOM ' ); cdwp.tableRowClose; cdwp.tableRowOpen; cdwp.tabledataheading ( cdwp.add_images('{workarea.gif}') ||Rob_msg.GetMsg(Rob_msg.CAP077_ODWACHCK_WA,'','','','') ); cdwp.TableDataValue ( cdwpbase.get_wa_name(p_wa_irid => odwactxt.get_workarea_irid) , p_Attributes => ' VALIGN=BOTTOM ' ); cdwp.tableRowClose; if length(l_description) > 0 then -- dummy form to contain the text area for the multi line text description htp.formOpen(Curl => 'none',Cattributes => 'NAME="descriptionForm"'); cdwp.tableRowOpen; cdwp.tabledataheading ( Rob_msg.GetMsg(Rob_msg.CAP008_CDWP_DESC ,'','','','') , p_attributes => 'VALIGN=TOP' ); cdwp.TableDataValue(l_description, p_attributes=> ' VALIGN="CENTER" '); cdwp.tableRowClose; end if; -- l_description <> '' cdwp.tableClose; htp.bodyclose; htp.htmlClose; end; -- prepareFileSuccess -- this function handles the current execption; -- it will analyze the error stack and return a string with all found exceptions,warnings and error messages function handle_exception return varchar2 is l_oracle_error_message varchar2(4000); l_message varchar2(100); l_stack varchar2(16000); arg0 varchar2(5000); arg1 varchar2(5000); arg2 varchar2(5000); arg3 varchar2(5000); arg4 varchar2(5000); arg5 varchar2(5000); arg6 varchar2(5000); arg7 varchar2(5000); arg8 varchar2(5000); msg_fac varchar2(100); msg_code varchar2(100); procedure write( p_text in varchar2) is begin l_stack:= l_stack ||chr(10)||chr(13)||p_text ; end; -- write begin if cdapi.stacksize > 0 then while cdapi.stacksize > 0 loop cdapi.get_message ( cdapi.stacksize , msg_fac , msg_code ,arg1 ,arg2,arg3,arg4,arg5,arg6,arg7,arg8 ); if instr( arg8, 'UDM') > 0 -- User Defined Message then -- now pop the message to remove it from the message stack! cdapi.pop_message ( msg_fac , msg_code ,arg1 ,arg2,arg3,arg4,arg5,arg6,arg7,arg8 ); write( msg_fac||'-'||msg_code||':'||arg7||arg6||arg5 ||cdwpbase.ifThenElse( arg6 <> '', ', '||arg6) ||cdwpbase.ifThenElse( arg5 <> '', ', '||arg5) ||cdwpbase.ifThenElse( arg4 <> '', ', '||arg6) ||cdwpbase.ifThenElse( arg3 <> '', ', '||arg7) ); else write(cdapi.pop_instantiated_message); end if; end loop; if cdapi.activity is not null then cdapi.abort_activity; write(Rob_msg.GetMsg(Rob_msg.MSG161_ODWACHCK_APIERR ,'','','','')); else write(Rob_msg.GetMsg(Rob_msg.MSG162_ODWACHCK_SESSERR,'','','','')); end if; else l_oracle_error_message := sqlcode||' '||sqlerrm; if cdapi.activity is not null then cdapi.abort_activity; l_message := Rob_msg.GetMsg(Rob_msg.MSG161_ODWACHCK_APIERR ,'','','',''); else l_message := Rob_msg.GetMsg(Rob_msg.MSG162_ODWACHCK_SESSERR,'','','',''); end if; if l_oracle_error_message = '1 User-Defined Exception' then write(l_message||'.'); else write(l_message||Rob_msg.GetMsg(Rob_msg.DSP216_ODWACHCK_ORAERR ,'','','','')); write(l_oracle_error_message ); end if; end if; return l_stack; end handle_exception; function get_default_branch ( p_ivid in number ) return number is l_default_branch number(38); begin if Jr_Workarea.get_checkin_branch(Jr_Context.workarea) is not null then if jr_version.is_already_on_branch(i_irid => odwactxt.get_pac_irid ,i_branch_id => Jr_Workarea.get_checkin_branch(Jr_Context.workarea)) and Jr_Workarea.get_checkin_branch(Jr_Context.workarea) <> jr_version.get_current_branch_id(i_irid => odwactxt.get_pac_irid,i_ivid => p_ivid) then l_default_branch:= jr_version.get_current_branch_id(i_irid => odwactxt.get_pac_irid, i_ivid => p_ivid); else l_default_branch:= jr_workarea.get_checkin_branch(workarea_id => odwactxt.get_workarea_irid); end if; -- other versions are already on branch. the one checked in not yet else l_default_branch:= jr_version.get_current_branch_id(i_irid => odwactxt.get_pac_irid, i_ivid => p_ivid); end if; -- Workareas has a speuplfic check in branch return l_default_branch; end; -- get_default_branch procedure prepareNewFile ( p_session_id in number , p_ivid in number , p_filename in varchar2 , p_description in varchar2 default null ) is l_stack varchar2(16000); l_act_status varchar2(1); l_irid number(38); l_ivid number(38); l_kind varchar2(10); l_lob blob; l_filename varchar2(500); l_buflen number(10); l_description varchar2(32000) := nvl( p_description , Rob_msg.GetMsg(Rob_msg.MSG193_ODWASRCH_CREATLABEL,user,to_char( sysdate, 'dd-mon-yyyy hh24:mi'),'','') ); function fileExists( folder_irid in number, filename in varchar2 ) return boolean is begin if jr_file.num_files_for_download(folder_irid, filename) <= 0 then return false; else return true; end if; end; begin --Prepare new file odwactxt.update_context ( p_session_id => p_session_id , p_pac_irid => cdwpbase.get_irid( p_ivid) , p_pac_ivid => p_ivid , p_package_name => PACKAGE_NAME , p_procedure_name=> 'docheckin' ); l_filename:= substr( p_filename , instr( p_filename , '\' , -1 ) + 1 ); if fileExists(odwactxt.get_folder_irid, l_filename) then uplNewFormFrame ( p_Session_Id => odwactxt.get_session_id , p_Ivid => p_ivid , p_Error_Stack => Rob_msg.GetMsg(Rob_msg.MSG194_ODWASRCH_ERRCREATE,'','','','')||l_filename||': '|| Rob_msg.getMsg(Rob_msg.MSG245_CREATE_FAIL,'','','','') ); else jr_context.set_workarea(workarea_irid => odwactxt.get_workarea_irid); cdapi.open_activity; cdapi.set_context_container(curr_container_name => '',curr_container_ref => odwactxt.get_folder_irid); jr_file.new_file ( filename => l_filename , context_folder => odwactxt.get_folder_irid , file_irid => l_irid , file_ivid => l_ivid , file_kind => l_kind , blob_loc => l_lob ); -- if a description has been entered by the user, create the Multi Line Text -- Description for the file rmotextp.writeall ( ref => l_irid , txt_type => 'CDIDSC' , element_type_for => 'FILES' , buffer => l_description , buflen => length(l_description) , bufwrt => l_buflen ); cdapi.close_activity(act_status => l_act_status); -- attempt Check In -- when successful, return HTML page with -- 1) Success Report -- 2) The second frame is rewritten with an OK button -- (that when pressed will close the Window and ideally requery the calling form) prepareFileSuccess ( p_session_id => odwactxt.get_session_id , p_ivid => l_ivid , p_filename => l_filename ); end if; -- When failed: -- * retrieves the error messages into a string -- * calls uplNewFormFram with the error mesaages and the Form Field values exception when others then l_stack:= handle_exception; uplNewFormFrame ( p_Session_Id => odwactxt.get_session_id , p_Ivid => p_ivid , p_Error_Stack => Rob_msg.GetMsg(Rob_msg.MSG194_ODWASRCH_ERRCREATE,'','','','')||l_filename||': '||l_stack ); end; -- prepareNewFile procedure uplFormFrame ( p_session_id in number , p_ivid in number ) is l_new_file boolean default p_ivid is null; l_menu_bar varchar2(4000); l_label varchar2(2000); l_warning varchar2(10000); l_first boolean; l_first_check_in boolean:= odwavrsn.get_check_status(p_ivid => p_ivid) = 'Unversioned'; l_description varchar2(32000); l_buflen number(5); cursor c_fil( b_ivid in number) is select fil.date_created , fil.date_changed , fil.changed_by , fil.notm , fil.file_size , fil.name , fil.kind , fil.os_timestamp , fil.short_description from i$sdd_files fil where fil.ivid = b_ivid ; r_fil c_fil%rowtype; begin odwactxt.update_context ( p_session_id => p_session_id , p_pac_irid => cdwpbase.get_irid( p_ivid) , p_pac_ivid => p_ivid , p_package_name => PACKAGE_NAME , p_procedure_name=> 'uplFormFrame' ); open c_fil( b_ivid => p_ivid); fetch c_fil into r_fil; close c_fil; l_label:= r_fil.name; rmotextp.readall ( ref => cdwpbase.get_irid( p_ivid) , txt_type => 'CDIDSC' , buffer => l_description , buflen => 32000 , bufret => l_buflen ); htp.htmlOpen; htp.headopen; cdwp.write_about(package_name, revision_label); cdwp.include_report_styles; htp.p(''); odwavrsn.js_invoke_vev ( p_irid => odwactxt.get_pac_irid , p_ivid => p_ivid ); odwavrsn.js_invoke_vhv ( p_irid => odwactxt.get_pac_irid , p_ivid => p_ivid ); odwainfo.js_invoke_info; htp.headClose; htp.bodyopen(); htp.p(''); htp.p(''); l_menu_bar:=cdwp.add_images( p_text => '{ft-left.gif}') ; l_menu_bar:= l_menu_bar ||htf.anchor2 -- 1.2 ( curl => 'javascript:invokeVhv('''','''');' , ctext => cdwp.add_images ( p_text => '{versiontreegr.gif}' , p_attributes=> ' alt="'||Rob_msg.GetMsg(Rob_msg.CAP073_ODWACHCK_VERHIST,'','','','')||'"' ) ) ||htf.anchor ( ctext=> cdwp.add_images ( '{vevgr.jpg}' , p_attributes => 'ALT="'||Rob_msg.GetMsg(Rob_msg.CAP074_ODWACHCK_REVHIST,'','','','')||'"' ) , curl => 'javascript:invokeVev();' ) ||odwabrow.browser_link ( p_session_id => odwactxt.get_session_id , p_ivid => p_ivid ) ||cdwp.add_images ( p_text => '{ft-right.gif}' , p_attributes=> ' Qwidth="25" ' ) ; htp.tabledata ( cvalue=> l_menu_bar ,calign => 'right' ,cattributes => 'Zwidth="400" ABGCOLOR="#cccccc"' ); htp.tableRowClose; htp.tableClose; htp.nl; -- include in this frame: -- * link to VHV -- * link to VHV-rev notes -- * link to ODWAINFO cdwp.p ( p_string => cdwp.add_images('{upload.gif}') ||Rob_msg.GetMsg(Rob_msg.CAP223_ODWARPRT_UPLOAD ,'','','','') , p_style => 'partitle' ); htp.nl; htp.nl; cdwp.tableOpen; -- **** WARNINGS ******* -- warn the user if another user checked out this version if USER <> odwavrsn.get_user_checked(p_ivid => p_ivid) then cdwp.tableRowOpen; cdwp.tabledataheading ( cdwp.add_images('{warning.gif}') ||Rob_msg.GetMsg(Rob_msg.DSP142_CDWP_WARNING ,'','','','') ); l_warning:= Rob_msg.GetMsg(Rob_msg.MSG173_ODWACHKI_CIWARN ,cdwp.add_images('{user.gif}')||odwavrsn.get_user_checked(p_ivid => p_ivid) ,odwavrsn.get_author_name(p_user => odwavrsn.get_user_checked(p_ivid => p_ivid)),to_char( odwavrsn.get_date_checked(p_ivid => p_ivid), 'DD-mon-YYYY HH24:MI'),'') ||'.
'||Rob_msg.GetMsg(Rob_msg.CAP083_ODWACHKI_CINNOTES ,'','','','')||':' ||htf.italic( odwavrsn.get_check_notes(p_ivid => p_ivid)) ||'
' ; cdwp.tabledatavalue ( l_warning , p_attributes => 'ALIGN=LEFT'); cdwp.tableRowClose; end if; -- USER <> odwavrsn.get_user_checked cdwp.tableRowOpen; cdwp.tabledataheading ( cdwp.add_images ('{' ||cdwpbase.get_icon( p_type_id => cdwpbase.get_ivid_type_id(p_ivid => p_ivid)) ||'}' ) ||cdwpbase.get_nls_type_name(p_type_id => cdwpbase.get_ivid_type_id(p_ivid => p_ivid)) ); cdwp.TableDataValue ( l_label ||cdwpbase.ifThenElse ( l_first_check_in , ' (New/Unversioned MAIN;1)' , ' ('||odwavrsn.get_version_label(p_ivid => p_ivid) ||' aka ' ||odwavrsn.get_branch_label(p_ivid => p_ivid) ||';'||to_char(odwavrsn.get_edge_sequence(p_ivid => p_ivid)) ||') ' ) ||odwainfo.info_url( p_ivid => p_ivid) ||cdwpbase.ifThenElse ( l_first_check_in , '' , '
' ||Rob_msg.GetMsg(Rob_msg.DSP355_ODWAUPLD_CODET,to_char(odwavrsn.get_date_checked(p_ivid => p_ivid), 'DD-mon-YYYY HH24:MI'),odwavrsn.get_user_checked(p_ivid => p_ivid),'','') ) , p_Attributes => ' VALIGN=BOTTOM ' ); cdwp.tableRowOpen; cdwp.tabledataheading ( Rob_msg.GetMsg(Rob_msg.CAP089_ODWACHKI_LASTMOD ,'','','','') ); cdwp.TableDataValue ( to_char(r_fil.date_changed, 'DD-mon-YYYY HH24:MI') ||Rob_msg.GetMsg(Rob_msg.CAP088_ODWACHKI_BY,'','','','') ||odwavrsn.get_author_name(p_user => r_fil.changed_by) ); cdwp.tableRowClose; cdwp.tableRowOpen; cdwp.tabledataheading ( Rob_msg.GetMsg(Rob_msg.CAP090_ODWACHKI_FILESIZE,'','','','') ); cdwp.TableDataValue ( cdwpbase.ifThenElse ( r_fil.file_size > 1024*1024 -- 1 Mb , to_char( trunc(1000* r_fil.file_size/(1024*1024))/1000)||' Mb' , cdwpbase.ifThenElse ( r_fil.file_size > 1024 -- 1 Kb , to_char( trunc(1000* r_fil.file_size/(1024)))/1000||' Kb' , to_char(r_fil.file_size) ) ) ); cdwp.tableRowClose; cdwp.tableRowOpen; cdwp.tabledataheading ( cdwp.add_images ('{folder.gif}' ) ||Rob_msg.GetMsg(Rob_msg.CAP075_ODWACHCK_FOLPATH ,'','','','') ); cdwp.TableDataValue ( cdwpbase.get_path( jr_name.get_path( id => odwactxt.get_pac_irid, format=> 'NAME')) , p_Attributes => ' VALIGN=BOTTOM ' ); cdwp.tableRowClose; if not l_first_check_in then cdwp.tableRowOpen; cdwp.tabledataheading ( cdwp.add_images('{branch.gif}') ||Rob_msg.GetMsg(Rob_msg.CAP076_ODWACHCK_BRANCH,'','','','') ); cdwp.TableDataValue ( odwavrsn.get_branch_label(p_ivid => p_ivid) , p_Attributes => ' VALIGN=BOTTOM ' ); cdwp.tableRowClose; end if; -- not l_first_checkin cdwp.tableRowOpen; cdwp.tabledataheading ( cdwp.add_images('{workarea.gif}') ||Rob_msg.GetMsg(Rob_msg.CAP077_ODWACHCK_WA,'','','','') ); cdwp.TableDataValue ( cdwpbase.get_wa_name(p_wa_irid => odwactxt.get_workarea_irid) , p_Attributes => ' VALIGN=BOTTOM ' ); cdwp.tableRowClose; if length( l_description) > 0 then -- dummy form to contain the text area for the multi line text description htp.formOpen(Curl => 'none',Cattributes => 'NAME="descriptionForm"'); cdwp.tableRowOpen; cdwp.tabledataheading ( Rob_msg.GetMsg(Rob_msg.CAP119_ODWAGRPH_DESC,'','','','') , p_attributes => 'VALIGN=TOP' ); cdwp.TableDataValue (l_description, p_attributes=>' VALIGN="CENTER"' ); cdwp.tableRowClose; end if; -- l_description <> '' cdwp.tableClose; htp.bodyclose; htp.htmlClose; end; -- uplFormFrame procedure uplNewFormFrame ( p_session_id in number , p_ivid in number default null , p_error_stack in varchar2 default '' ) is l_new_file boolean default p_ivid is null; l_menu_bar varchar2(4000); l_label varchar2(2000); l_warning varchar2(10000); l_first boolean; l_first_check_in boolean:= odwavrsn.get_check_status(p_ivid => p_ivid) = 'Unversioned'; l_error_stack varchar2(10000):= p_error_stack; -- 1.3 we can set the error stack locally too, when the Folder Check Out fails l_folder_co_ivid number(38):= odwactxt.get_folder_ivid; -- this procedure will check out the target folder for this upload operation -- it will set l_error_stack when anything goes wrong with that check out procedure checkout_folder is begin l_folder_co_ivid := jr_version.check_out ( i_irid => odwactxt.get_folder_irid , i_ivid => odwactxt.get_folder_ivid , i_lock => false , i_notes => Rob_msg.GetMsg(Rob_msg.DSP356_ODWAUPLD_COAUT,'','','','') ); odwactxt.update_context(p_folder_ivid => l_folder_co_ivid); exception when others then l_error_stack:= handle_exception; end; -- checkout_folder begin odwactxt.update_context ( p_session_id => p_session_id , p_package_name => PACKAGE_NAME , p_procedure_name=> 'uplNewFormFrame' ); -- 1.3 if uploading a new file into a folder that is currently checked in, that folder should first be checked out if odwavrsn.get_check_status(p_ivid => odwactxt.get_folder_ivid) = 'Checked In' then checkout_folder; end if; -- odwavrsn.get_check_status(p_ivid => odwactxt.get_folder_ivid) = 'Checked In' l_label:=cdwpbase.get_name( jr_name.get_path( id => odwactxt.get_pac_irid, format=> 'NAME')); -- the default branch will be the check in branch of the current Workarea, unless -- other versions of the object and not the current one already exist on that branch htp.htmlOpen; htp.headopen; cdwp.write_about(package_name, revision_label); cdwp.include_report_styles; htp.p(''); js_init ( p_error_stack => l_error_stack ); htp.headClose; htp.bodyopen(cattributes => 'onLoad="init();top.initFolIvid();top.setFolIvid('''||to_char(l_folder_co_ivid)||''')"'); htp.nl; -- include in this frame: -- * link to VHV -- * link to VHV-rev notes -- * link to ODWAINFO cdwp.p ( p_string => cdwp.add_images('{upload.gif}') ||Rob_msg.GetMsg(Rob_msg.CAP298_ODWAUPLD_CRUPL,'','','','') , p_style => 'partitle' ); htp.nl; htp.nl; cdwp.tableOpen; -- if l_error_stack <> '' -- the report the errors now if length(l_error_stack) > 0 then htp.formopen ( curl => 'none' , cmethod => 'POST' , cattributes => 'NAME="errorStackForm"' ); cdwp.tableRowOpen; cdwp.tabledataheading ( cdwp.add_images('{deletion.gif}') ||Rob_msg.GetMsg(Rob_msg.CAP086_ODWACHKI_ERRS,'','','','') , p_attributes => 'VALIGN=TOP' ); --htf.escape_sc(p_error_stack) cdwp.TableDataValue ( htf.formtextarea2 ( cname => 'errorStack' , nrows => 5 , ncolumns => 50 , cwrap => 'VIRTUAL' ) ); cdwp.tableRowClose; htp.formClose; end if; -- error stack not empty htp.formopen ( curl => 'odwaupld.prepareNewFile' , cmethod => 'POST' , cattributes => 'NAME="newFileForm" accept-charset=' || odwapref.get_value('charset') ); cdwp.tableRowOpen; cdwp.tabledataheading ( cdwp.add_images ('{folder.gif}' ) ||Rob_msg.GetMsg(Rob_msg.CAP075_ODWACHCK_FOLPATH ,'','','','') ); cdwp.TableDataValue ( jr_name.get_path( id => odwactxt.get_folder_ivid, format=> 'NAME') , p_Attributes => ' VALIGN=BOTTOM ' ); cdwp.tableRowClose; cdwp.tableRowOpen; cdwp.tabledataheading ( cdwp.add_images('{workarea.gif}') ||Rob_msg.GetMsg(Rob_msg.CAP077_ODWACHCK_WA,'','','','') ); cdwp.TableDataValue ( cdwpbase.get_wa_name(p_wa_irid => odwactxt.get_workarea_irid) , p_Attributes => ' VALIGN=BOTTOM ' ); cdwp.tableRowClose; cdwp.tableRowOpen; cdwp.tabledataheading ( Rob_msg.GetMsg(Rob_msg.CAP119_ODWAGRPH_DESC,'','','','') , p_attributes => 'VALIGN=TOP' ); cdwp.TableDataValue ( htf.formtextarea2 ( cname => 'p_description' , nrows => 4 , ncolumns => 40 , cwrap => 'VIRTUAL' ) ); cdwp.tableRowClose; htp.formhidden ( cname => 'p_filename' , cvalue => to_char(odwactxt.get_pac_ivid) ); htp.formhidden ( cname => 'p_ivid' , cvalue => to_char(odwactxt.get_pac_ivid) ); htp.formhidden ( cname => 'p_session_id' , cvalue => to_char(odwactxt.get_session_id) ); htp.formclose; -- newFileForm cdwp.tableClose; htp.bodyclose; htp.htmlClose; end; -- uplNewFormFrame procedure js_submit_new_upload is begin htp.p (' '); end; --js_submit_new_upload -- this javascript function will continue with submit if the selected filename -- is equal to the repository file name (in p_filename). If the two are different, -- a confirmation dialog is presented to the user. procedure js_validate_filename ( p_filename in varchar2 ) is begin htp.p (' '); end; --js_validate_filename procedure uplButtonFrame ( p_session_id in number , p_ivid in number ) is l_new_file boolean default p_ivid is null; begin odwactxt.update_context ( p_session_id => p_session_id , p_package_name => PACKAGE_NAME , p_procedure_name=> 'uplButtonFrame' , p_pac_irid => cdwpbase.get_irid (p_ivid) , p_pac_ivid => p_ivid ); htp.htmlOpen; htp.headopen; if l_new_file then js_submit_new_upload; else js_validate_filename( p_filename => cdwpbase.get_name( jr_name.get_path( id => odwactxt.get_pac_irid, format=> 'NAME'))); end if; -- l_new_file cdwp.include_report_styles; htp.p(''); cdwp.write_about(package_name, revision_label); htp.headclose; htp.bodyopen; htp.formopen -- using the Repository Java File API -- ( curl => 'http://localhost.nl.oracle.com/odwa6i/oracle.des.rob.fileServices.UploadReposFile' -- using standard JDBC -- ( curl => 'http://localhost.nl.oracle.com/odwa6i/oracle.des.rob.standardServices.UploadReposFile' -- using standard JDBC ( curl => cdwp_fil.servlet_urlbase||'oracle.des.rob.standardServices.UploadReposFile' , cmethod => 'POST' , cenctype => 'multipart/form-data' , cattributes => 'NAME=fileSubmitForm accept-charset="'||odwapref.get_value('charset')||'"' ); htp.tableOpen(Calign => 'CENTER'); htp.formhidden(cname => 'waName' ,cvalue => cdwpbase.get_wa_name(p_wa_irid => odwactxt.get_workarea_irid)); htp.formhidden(cname => 'folderIvid' ,cvalue => to_char(odwactxt.get_folder_ivid)); htp.formhidden(cname => 'folderIrid' ,cvalue => to_char(odwactxt.get_folder_irid)); htp.formhidden(cname => 'Ivid' ,cvalue => to_char(p_ivid)); htp.formhidden(cname => 'Irid' ,cvalue => to_char(odwactxt.get_pac_irid)); htp.formhidden(cname => 'sessionId' ,cvalue => to_char(odwactxt.get_session_id)); cdwp.tablerowopen; cdwp.tabledataheading('File:'); cdwp.tabledatavalue ( htf.formfile(cname => 'file',cattributes => 'SIZE=45') ); cdwp.tableRowClose; htp.tableClose; htp.formClose; htp.formopen ( curl => '' , cmethod => 'POST' , cattributes => 'NAME="buttonForm"' ); htp.tableopen(calign => 'CENTER'); htp.tablerowopen; htp.tabledata ( ' p_session_id , p_package_name => PACKAGE_NAME , p_procedure_name=> 'uplCommandFrame' , p_pac_irid => cdwpbase.get_irid (p_ivid) , p_pac_ivid => p_ivid ); if p_command is not null then begin execute immediate p_command; exception when others then l_result:= sqlerrm; l_result:= l_result||' '||dbms_utility.format_error_stack; l_result:= l_result||' '||dbms_utility.format_call_stack; end; end if; -- p_command is not null htp.htmlOpen; htp.headopen; htp.comment ( ' Executed command ' ||p_command ||' with the following result: ' ||nvl(l_result, 'Success') ); htp.headclose; htp.bodyopen; htp.formopen ( curl => 'odwaupld.uplCommandFrame' , cmethod => 'POST' , cattributes => 'NAME=commandForm' ); htp.formhidden(cname => 'p_command' ,cvalue => ''); htp.formhidden(cname => 'p_ivid' ,cvalue => to_char(p_ivid)); htp.formhidden(cname => 'p_session_id' ,cvalue => to_char(odwactxt.get_session_id)); htp.formClose; htp.bodyclose; htp.htmlClose; end; -- uplCommandFrame /* |------------------------------------|=> odwaupld.upload | -------------------------------- | | | uplFormFrame | | | | | | | | | | | |-------------------------------- | | -------------------------------- | | | uplButtonFrame | | | |-------------------------------| | | -------------------------------- | | | uplCommandFrame | | | |-------------------------------| | |------------------------------------| */ -- this procedure defines an HTML document with two frames procedure upload ( p_session_id in number , p_ivid in number -- when null this is a first upload ) is l_new_file boolean default p_ivid is null; l_unversioned boolean:= odwavrsn.get_check_status(p_ivid => p_ivid) = 'Unversioned'; begin -- create session when necessary, refresh session cache, set workarea context -- from here on reference to odwactxt.get_... functions for any context value odwactxt.update_context ( p_session_id => p_session_id , p_package_name => PACKAGE_NAME , p_procedure_name=> 'upload' , p_pac_irid => cdwpbase.get_irid (p_ivid) , p_pac_ivid => p_ivid ); htp.htmlOpen; htp.headOpen; js_do_sql; cdwp.write_about(package_name, revision_label); if l_new_file then htp.title ( Rob_msg.GetMsg(Rob_msg.DSP357_ODWAUPLD_INTO,'','','','') ||jr_name.get_path( id => odwactxt.get_folder_irid, format=> 'NAME') ||cdwpbase.ifThenElse ( odwavrsn.get_check_status(p_ivid => odwactxt.get_folder_ivid) = 'Unversioned' , ' (New/Unversioned MAIN;1)' , ' ('||odwavrsn.get_version_label(p_ivid => odwactxt.get_folder_ivid) ||' aka ' ||odwavrsn.get_branch_label(p_ivid => odwactxt.get_folder_ivid) ||';'||to_char(odwavrsn.get_edge_sequence(p_ivid => odwactxt.get_folder_ivid)) ||') ' ) ); else htp.title ( Rob_msg.GetMsg(Rob_msg.DSP358_ODWAUPLD_UPLD,'','','','') ||jr_name.get_path( id => odwactxt.get_pac_irid, format=> 'NAME') ||cdwpbase.ifThenElse ( l_unversioned , ' (New/Unversioned MAIN;1)' , ' ('||odwavrsn.get_version_label(p_ivid => p_ivid) ||' aka ' ||odwavrsn.get_branch_label(p_ivid => p_ivid) ||';'||to_char(odwavrsn.get_edge_sequence(p_ivid => p_ivid)) ||') ' ) ); end if; -- l_new_file odwainfo.js_invoke_info; js_ok ( p_new_file => l_new_file and odwavrsn.get_check_status(p_ivid => odwactxt.get_folder_ivid) = 'Checked In' ); -- allow frames in this document to include calls to the On Line Help System by including the -- JavaScript function that can invoke the Help Window odwahelp.js_invoke_help; htp.headClose; if l_new_file then htp.framesetopen ( crows => '60%,40%,*' , cattributes => 'BORDER="0" LONGDESC=odwahelp.rightSide?p_session_id=&p_him_id=100 TITLE="' ||Rob_msg.Getmsg(Rob_msg.CAP223_ODWARPRT_UPLOAD,'','','','')||'"' ); htp.frame ( csrc => 'odwaupld.uplNewFormFrame?p_session_id=' ||to_char(odwactxt.get_session_id) , cname=> 'uplFormFrame' , cattributes => 'LONGDESC=odwahelp.rightSide?p_session_id=&p_him_id=100 TITLE="' ||Rob_msg.Getmsg(Rob_msg.CAP223_ODWARPRT_UPLOAD,'','','','')||'"' ); else htp.framesetopen ( crows => '65%,35%,*' , cattributes => 'BORDER="0" LONGDESC=odwahelp.rightSide?p_session_id=&p_him_id=100 TITLE="' ||Rob_msg.Getmsg(Rob_msg.CAP223_ODWARPRT_UPLOAD,'','','','')||'"' ); htp.frame ( csrc => 'odwaupld.uplFormFrame?p_session_id=' ||to_char(odwactxt.get_session_id) ||chr(38)||'p_ivid='||to_char(p_ivid) , cname=> 'uplFormFrame' , cattributes => 'LONGDESC=odwahelp.rightSide?p_session_id=&p_him_id=100 TITLE="' ||Rob_msg.Getmsg(Rob_msg.CAP223_ODWARPRT_UPLOAD,'','','','')||'"' ); end if; -- l_new_file htp.frame ( csrc => 'odwaupld.uplButtonFrame?p_session_id=' ||to_char(odwactxt.get_session_id) ||chr(38)||'p_ivid='||to_char(p_ivid) , cname=> 'uplButtonFrame' , cattributes => 'LONGDESC=odwahelp.rightSide?p_session_id=&p_him_id=100 TITLE="' ||Rob_msg.Getmsg(Rob_msg.CAP223_ODWARPRT_UPLOAD,'','','','')||'"' ); -- this frame is invisible; it can be used to have certain actions performed on the server -- it contains a form item COMMAND that can executed as Dynamic SQL in the Server htp.frame ( csrc => 'odwaupld.uplCommandFrame?p_session_id=' ||to_char(odwactxt.get_session_id) ||chr(38)||'p_ivid='||to_char(p_ivid) , cname=> 'uplCommandFrame' , cattributes => 'LONGDESC=odwahelp.rightSide?p_session_id=&p_him_id=100 TITLE="' ||Rob_msg.Getmsg(Rob_msg.CAP223_ODWARPRT_UPLOAD,'','','','')||'"' ); htp.framesetclose; htp.htmlClose; end; -- upload procedure createFolderSuccess ( p_ivid in number , p_name in varchar2 ) is l_menu_bar varchar2(4000); l_label varchar2(2000); l_description varchar2(32000); l_buflen number(5); begin rmotextp.readall ( ref => cdwpbase.get_irid( p_ivid) , txt_type => 'CDIDSC' , buffer => l_description , buflen => 32000 , bufret => l_buflen ); htp.htmlOpen; htp.headopen; cdwp.write_about(package_name, revision_label); cdwp.include_report_styles; htp.p(''); odwainfo.js_invoke_info; js_start_upload ( p_irid => odwactxt.get_pac_irid , p_ivid => p_ivid ); htp.title(Rob_msg.GetMsg(Rob_msg.CAP299_ODWAUPLD_CREFOL,'','','','') ||jr_name.get_path( id => p_ivid, format=> 'NAME') ); htp.headClose; htp.bodyopen; -- include in this frame: -- * link to VHV -- * link to VHV-rev notes -- * link to ODWAINFO cdwp.p ( p_string => Rob_msg.GetMsg(Rob_msg.CAP300_ODWAUPLD_NEWFOL,'','','','') , p_style => 'partitle' ); htp.nl; htp.nl; cdwp.tableOpen; cdwp.tableRowOpen; cdwp.tabledataheading ( cdwp.add_images ('{folder.gif}' ) ||Rob_msg.GetMsg(Rob_msg.CAP301_ODWAUPLD_FOLDER,'','','','') ); cdwp.TableDataValue ( jr_name.get_path( id => p_ivid, format=> 'NAME') , p_Attributes => ' VALIGN=BOTTOM ' ); cdwp.tableRowClose; cdwp.tableRowOpen; cdwp.tabledataheading ( cdwp.add_images('{workarea.gif}') ||Rob_msg.GetMsg(Rob_msg.CAP077_ODWACHCK_WA,'','','','') ); cdwp.TableDataValue ( cdwpbase.get_wa_name(p_wa_irid => odwactxt.get_workarea_irid) , p_Attributes => ' VALIGN=BOTTOM ' ); cdwp.tableRowClose; cdwp.tableClose; htp.formopen ( curl => '' , cmethod => 'POST' , cattributes => 'NAME="buttonForm"' ); htp.tableopen(calign => 'CENTER'); htp.tablerowopen; htp.tabledata ( ' p_session_id , p_package_name => PACKAGE_NAME , p_procedure_name=> 'createNewFolder' , p_folder_ivid => p_parent_folder_ivid , p_workarea_irid => p_workarea_irid ); jr_context.set_workarea(workarea_irid => odwactxt.get_workarea_irid); cdapi.set_context_container(curr_container_name => '',curr_container_ref => odwactxt.get_folder_irid); if p_parent_folder_ivid is null then cdapi.initialize; else cdapi.initialize(curr_app_sys_ref => odwactxt.get_folder_irid); end if; if folderExists(odwactxt.get_folder_irid, p_name) then createFolderFrame ( p_Session_Id => odwactxt.get_session_id , p_Parent_Folder_Ivid => p_parent_folder_ivid , p_workarea_irid => p_workarea_irid , p_Error_Stack => Rob_msg.GetMsg(Rob_msg.MSG196_ODWAUPLD_ERRFOL,'','','','')||p_name||': ' ||Rob_msg.Getmsg(Rob_msg.MSG245_CREATE_FAIL,'','','','') ); else if true -- test if folder type is APP or FOL then cdapi.open_activity; jr_folder.new_folder ( folder_name => p_name , context_folder => odwactxt.get_folder_irid , folder_irid => l_fol_irid , folder_ivid => l_fol_ivid ); cdapi.close_activity(act_status => l_ok); else cdapi.open_activity; l_apprec.v.name:= p_name; l_apprec.i.name:=true; cioapplication_system.ins(id => null,pl => l_apprec); cdapi.close_activity(act_status => l_ok); l_fol_irid:= l_apprec.v.id; l_fol_ivid:= l_apprec.v.ivid; end if; -- if a description has been entered by the user, create the Multi Line Text -- Description for the file rmotextp.writeall ( ref => l_fol_irid , txt_type => 'CDIDSC' , element_type_for => 'FOL' -- or CEL? , buffer => l_description , buflen => length(l_description) , bufwrt => l_buflen ); createFolderSuccess ( p_ivid => l_fol_ivid , p_name => p_name ); end if; -- When failed: -- * retrieves the error messages into a string -- * calls createFolder with the error mesaages and the Form Field values exception when others then l_stack:= handle_exception; createFolderFrame ( p_Session_Id => odwactxt.get_session_id , p_Parent_Folder_Ivid => p_parent_folder_ivid , p_workarea_irid => p_workarea_irid , p_Error_Stack => Rob_msg.GetMsg(Rob_msg.MSG196_ODWAUPLD_ERRFOL,'','','','')||p_name||': '||l_stack ); end; -- createNewFolder procedure createFolderFrame ( p_session_id in number , p_workarea_irid in number , p_parent_folder_ivid in number default null , p_error_stack in varchar2 default '' ) is l_menu_bar varchar2(4000); l_label varchar2(2000); l_warning varchar2(10000); l_first boolean; l_error_stack varchar2(10000):= p_error_stack; -- 1.3 we can set the error stack locally too, when the Folder Check Out fails l_folder_co_ivid number(38):= p_parent_folder_ivid; -- this procedure will check out the parent folder for this create folder operation -- it will set l_error_stack when anything goes wrong with that check out procedure checkout_folder is begin l_folder_co_ivid := jr_version.check_out ( i_irid => odwactxt.get_folder_irid , i_ivid => odwactxt.get_folder_ivid , i_lock => false , i_notes => Rob_msg.GetMsg(Rob_msg.DSP356_ODWAUPLD_COAUT ,'','','','') ); odwactxt.update_context(p_folder_ivid => l_folder_co_ivid); exception when others then l_error_stack:= handle_exception; end; -- checkout_folder begin odwactxt.update_context ( p_session_id => p_session_id , p_package_name => PACKAGE_NAME , p_procedure_name=> 'createFolder' , p_folder_ivid => p_parent_folder_ivid , p_workarea_irid => p_workarea_irid ); -- 1.3 if creating a nested folder in a folder that is currently checked in, that folder should first be checked out if odwavrsn.get_check_status(p_ivid => odwactxt.get_folder_ivid) = 'Checked In' then checkout_folder; end if; -- odwavrsn.get_check_status(p_ivid => odwactxt.get_folder_ivid) = 'Checked In' htp.htmlOpen; htp.headopen; cdwp.write_about(package_name, revision_label); cdwp.include_report_styles; htp.p(''); js_init ( p_error_stack => l_error_stack ); htp.title(Rob_msg.GetMsg(Rob_msg.CAP302_ODWAUPLD_NEWFOL,'','','','')); htp.headClose; htp.bodyopen(cattributes => 'onLoad="init();top.initFolIvid();top.setFolIvid('''||to_char(l_folder_co_ivid)||''')"'); htp.nl; -- include in this frame: -- * link to VHV -- * link to VHV-rev notes -- * link to ODWAINFO cdwp.p ( p_string => cdwp.add_images('{folder.gif}') ||Rob_msg.GetMsg(Rob_msg.CAP303_ODWAUPLD_NEWFOL ,'','','','') , p_style => 'partitle' ); htp.nl; htp.nl; cdwp.tableOpen; -- if l_error_stack <> '' -- the report the errors now if length(l_error_stack) > 0 then htp.formopen ( curl => 'none' , cmethod => 'POST' , cattributes => 'NAME="errorStackForm"' ); cdwp.tableRowOpen; cdwp.tabledataheading ( cdwp.add_images('{deletion.gif}') ||Rob_msg.GetMsg(Rob_msg.CAP086_ODWACHKI_ERRS ,'','','','') , p_attributes => 'VALIGN=TOP' ); --htf.escape_sc(p_error_stack) cdwp.TableDataValue ( htf.formtextarea2 ( cname => 'errorStack' , nrows => 5 , ncolumns => 50 , cwrap => 'VIRTUAL' ) ); cdwp.tableRowClose; htp.formClose; end if; -- error stack not empty htp.formopen ( curl => 'odwaupld.createNewFolder' , cmethod => 'POST' , cattributes => 'NAME="newFolderForm"' ); cdwp.tableRowOpen; cdwp.tabledataheading ( cdwp.add_images('{workarea.gif}') ||Rob_msg.GetMsg(Rob_msg.CAP077_ODWACHCK_WA,'','','','') ); cdwp.TableDataValue ( cdwpbase.get_wa_name(p_wa_irid => odwactxt.get_workarea_irid) , p_Attributes => ' VALIGN=BOTTOM ' ); cdwp.tableRowClose; if p_parent_folder_ivid is not null then cdwp.tableRowOpen; cdwp.tabledataheading ( cdwp.add_images ('{folder.gif}' ) ||Rob_msg.GetMsg(Rob_msg.CAP075_ODWACHCK_FOLPATH,'','','','') ); cdwp.TableDataValue ( jr_name.get_path( id => odwactxt.get_folder_ivid, format=> 'NAME') , p_Attributes => ' VALIGN=BOTTOM ' ); cdwp.tableRowClose; else cdwp.tableRowOpen; cdwp.tabledataheading ( cdwp.add_images ('{folder.gif}' ) ||Rob_msg.GetMsg(Rob_msg.CAP304_ODWAUPLD_NEWROOTFOL,'','','','') ); cdwp.tableRowClose; end if; cdwp.tableRowOpen; cdwp.tabledataheading ( Rob_msg.GetMsg(Rob_msg.CAP019_CDWP_NAME ,'','','','') , p_attributes => 'VALIGN=TOP' ); cdwp.TableDataValue ( htf.formtext ( cname => 'p_name' , csize => 40 , cmaxlength => 256 ) ); cdwp.tableRowClose; cdwp.tableRowOpen; cdwp.tabledataheading ( Rob_msg.GetMsg(Rob_msg.CAP119_ODWAGRPH_DESC,'','','','') , p_attributes => 'VALIGN=TOP' ); cdwp.TableDataValue ( htf.formtextarea2 ( cname => 'p_description' , nrows => 4 , ncolumns => 40 , cwrap => 'VIRTUAL' ) ); cdwp.tableRowClose; htp.formhidden ( cname => 'p_session_id' , cvalue => to_char(odwactxt.get_session_id) ); htp.formhidden ( cname => 'p_parent_folder_ivid' , cvalue => to_char(odwactxt.get_folder_ivid) ); htp.formhidden ( cname => 'p_workarea_irid' , cvalue => to_char(odwactxt.get_workarea_irid) ); htp.formclose; -- newFolderForm cdwp.tableClose; htp.formopen ( curl => '' , cmethod => 'POST' , cattributes => 'NAME="buttonForm"' ); htp.tableopen(calign => 'CENTER'); htp.tablerowopen; htp.tabledata ( ' p_session_id , p_package_name => PACKAGE_NAME , p_procedure_name=> 'createFolder' , p_workarea_irid => p_workarea_irid , p_folder_ivid => p_parent_folder_ivid ); htp.htmlOpen; htp.headOpen; js_do_sql; cdwp.write_about(package_name, revision_label); htp.title ( Rob_msg.GetMsg(Rob_msg.CAP305_ODWAUPLD_CRENEWFOL ,'','','','') ); odwainfo.js_invoke_info; js_ok ( p_new_file => true ); js_grant_request; -- allow frames in this document to include calls to the On Line Help System by including the -- JavaScript function that can invoke the Help Window odwahelp.js_invoke_help; htp.headClose; htp.framesetopen ( crows => '100%,*' , cattributes => 'BORDER="0" LONGDESC=odwahelp.rightSide?p_session_id=&p_him_id=100 TITLE="' ||Rob_msg.Getmsg(Rob_msg.CAP223_ODWARPRT_UPLOAD,'','','','')||'"' ); htp.frame ( csrc => 'odwaupld.createFolderFrame?p_session_id=' ||to_char(odwactxt.get_session_id) ||chr(38)||'p_parent_folder_ivid='||to_char(p_parent_folder_ivid) ||chr(38)||'p_workarea_irid='||to_char(p_workarea_irid) , cname=> 'createFolderFrame' , cattributes => 'LONGDESC=odwahelp.rightSide?p_session_id=&p_him_id=100 TITLE="' ||Rob_msg.Getmsg(Rob_msg.CAP223_ODWARPRT_UPLOAD,'','','','')||'"' ); -- this frame is invisible; it can be used to have certain actions performed on the server -- it contains a form item COMMAND that can executed as Dynamic SQL in the Server htp.frame ( csrc => 'odwaupld.uplCommandFrame?p_session_id=' ||to_char(odwactxt.get_session_id) , cname=> 'uplCommandFrame' , cattributes => 'LONGDESC=odwahelp.rightSide?p_session_id=&p_him_id=100 TITLE="' ||Rob_msg.Getmsg(Rob_msg.CAP223_ODWARPRT_UPLOAD,'','','','')||'"' ); htp.framesetclose; htp.htmlClose; end; --createFolder end; -- odwaupld /