This is a hack that worked for me on several occasions. Our development environment was upgraded to Oracle ApEx 3.1, but for whatever reason, our production environment was not (it’s still sitting on the previous version ApEx 3.0). Our server administrator wouldn’t allow the upgrade on production because of a “bug” with ApEx 3.1. He didn’t really elaborate on what that bug was, but anyway, as a developer, I needed to deploy new pages to our production environment.
To import an Oracle ApEx 3.1 Page Export into an ApEx 3.0 application, do the following:
1. Export the page from the ApEx 3.1 software.
2. Using a reliable text editor, modify the page export and replace any references to the original application ID to the app ID of the application you want to import to (replace xxx with the new application ID):
prompt APPLICATION xxx - APP V5.6 -- SET APPLICATION ID wwv_flow.g_flow_id := xxx;
3. As specified in the following thread http://forums.oracle.com/forums/thread.jspa?messageID=2380177, modify the following in the page export:
in the command
wwv_flow_api.create_page(
remove this line:
p_include_apex_css_js_yn=>’Y’,
\– \————————————————————-
in the command
wwv_flow_api.create_page_plug (
after the line
p_plug_caching=> …….
add
p_required_patch=> ” + wwv_flow_api.g_id_offset,
\– \————————————————————-
everywhere you find the command
wwv_flow_api.create_report_region (
remove line
p_ajax_enabled=> ‘N’,
In the command
wwv_flow_api.create_flow(
Remove the following line
p_date_format => ‘DD-MON-RR’,
Replace All Occurences of
PICK_DATE_USING_APP_DATE_FORMAT
With
PICK_DATE_DD_MON_RR
Replace All Occurences of
HIDDEN_PROTECTED
With
HIDDEN
In the command
wwv_flow_api.create_report_region (
Delete the following lines
p_prn_content_disposition=> ‘ATTACHMENT’,
p_prn_document_header=> ‘APEX’,
p_prn_width_units=> ‘PERCENTAGE’,
4. Import the modified file using the Export/Import utility in ApEx 3.0, remember to specify “Application, Page or Component Export” as the file type.
5. Edit the page in Application Builder page editor and restore the following: Region Templates, Button Templates, and List Types, and whatever item attribute that may have dropped off because it doesn’t exist in the meta data of the new application.
That should be it. Cumbersome, I know, but trust me, it’s a lot quicker than recreating the page in the new application.
By the way, I’ve written a utility that converts Oracle ApEx 3.1 application package exports to 3.0. You can access the utility here http://www.technologydribble.info/convert-oracle-apex3.1-package-to-3.0.asp. It should also work for converting page exports, no problems.