Sunday, 11 May 2014

Installing APEX 4.2 to run on Oracle XE



Oracle 11gXE database currently comes with an older version of Application Express  This blog is aimed at giving you a step by step approach to upgrading to APEX 4.2

First of all download the software
Step 1
here

Step 2
Download APEX 4.2 from
Next install the database
Step 3
Install Oracle XE by double clicking on the OracleXE.exe file  
– specify the destination folder such as  c:\oraclexe
– specify the database password – this will be used for both the SYS AND SYSTEM users

Step 4
Make a note of the port numbers allocated as part of the installation eg
Port for the HTTP listener = 8080
Port for the database listener = 1521

Step 5
Once XE is installed rename/empty the existing apex  folder at c:\oraclexe\app\oracle\product\11.2.0\server\apex (this holds an older version of APEX and unzip the APEX 4.2 file into the following folder c:\oraclexe\apex

Next upgrade to APEX 4.2
The following steps assume you have the following directory structures:
c:\oraclexe\apex (this is the unzipped Version 4.2 file)
c:\oraclexe\app (this is created by the Oracle XE installation) 

Step 6
Open DOS window and change the default directory to the directory of the unzipped APEX file.
e.g.
CMD> cd c:\oraclexe\apex

Step 7 – Now upgrade to Version 4.2 - replace the word password  below with the password you created in Step 3 above
CMD> sqlplus system/password as sysdba
SQL> @apexins SYSAUX SYSAUX TEMP /i/
NB if you have problems accessing sqlplus you may need to set the environment variables in the DOS session eg:
set ORACLE_HOME = c:\oraclexe\app\oracle\product\11.2.0\server
set ORACLE_SID = XE

Once this step has completed you will automatically be logged out of SQLPlus.

Step 8 - Set the images directory - replace the word password  below with the password you created in Step 3 above
CMD> sqlplus system/password as sysdba
SQL> @apxldimg.sql c:\oraclexe

Step 9 - Set the Admin password - replace the word password  below with your own value – this will be used to log into the internal workspace
SQL> @apxxepwd.sql password

Step 10 - Enable remote http connections - set l_access to TRUE to restrict the EPG to listen on the localhost only or set it to FALSE to listen on both localhost and non-localhost interfaces.
SQL> exec dbms_xdb.setListenerLocalAccess (l_access => FALSE);

Your upgrade should now be complete.
To test it open up a browser and type the following URL:
 http://localhost:8080/apex

This should take you to the Oracle Application Express login page

Enter the following values replacing password with the one you created at Step 9 above
Workspace: Internal
Username: Admin
Password: password


Thursday, 19 September 2013

Oracle APEX - Customizing the feedback page

Feedback is the process of gathering real-time comments from end users. To help facilitate this Oracle introduced a new page type in version 4 called 'Feedback'. All the feedback generated for your application gets fed into the Team Development section inside APEX. Once you have added the page to your application you can then gather the comments from your users and review it in the Team Development section. If you run the Sample Application you can see it being used as follows:





If you don't see the 'Feedback' link then it means you haven't enabled feedback for this application. To do this click on the 'Administration' navigation bar entry and select 'Feedback' from the options. Now enable feedback. You should now see the 'Feedback' link appear as in the above screenshot.

When you run the page you will see it is pre-populated with the application's id and name and also the page number and name. It also has a text area to hold the actual feedback and a simple select list for the user to link their comments with the appropriate feedback type.  When the user clicks on the 'Submit Feedback' page a process runs that adds the feedback into the APEX_TEAM_FEEDBACK view.  If you look at the source code in the process then you will see it is calling of one the inbuilt APEX APIS apex_util



The documentation for the apex_util.submit_feedback procedure tells you we can add up to 8 custom items to our page to allow our users more options when giving their feedback.

So let's give it a go! First of all I'm going to add another page item to my feedback page called P102_PRIORITY. The aim of this item is to allow the user to designate the priority level for their feedback. To do this I'm going to make the item a select list based on the following static list:



When we run the page it now looks like this:



The next step is to make sure the feedback is written into the APEX_TEAM_FEEDBACK view. To do this we need to add our new page item and it's label to the 'Submit Feedback' process as follows:



To test this run your application and submit some feedback as follows:




Once the feedback has been submitted you can review it in Team Development and you will see the Priority attribute has been added to the report: