Posts

Showing posts with the label APEX

Your session has expired - For Custom Apps after Oracle Apex Upgrade from 5 to 20

I was getting the above error " Your session has expired " immediately after upgrade of Oracle Apex from Version 5 to 20 in my premises. Searched a lot and did not find any resolution. After trying to login in same browser, tried a private browsing mode in Chrome and Firefox. It logged in. That is when i realized that it might be due to session cache/cookie. As a resolution I cleared all session cookies by clicking "Inspect Element/Storage" in Firefox. It worked after the storage for the site was cleared.

Reuse and Show Apex's Wait Popup

Oracle Apex supports or offers a GIF image and an overlay while loading content using Dynamic Action/AJAX. While creating a dynamic action you have an option to select "Show Processing" for supported actions. This shows a nice overlay over the screen and a GIF image out of the box. You may have scenarios to show a loading while doing some javascript/jquery actions on your own. Will it not be nice to show/reuse the same overlay and image? This article explains how to do it. Say you have a function to load data from server and show on page using a javascript function: function previewFiles(){    ajax.widget.waitPopup(); } The above javascript call will show the overlay and GIF image. This is very simple isn't it. But to hide it, there is no function. We have to call following jquery method calls. $("#apex_wait_popup").remove();   $("#apex_wait_overlay").remove(); Which will remove the popup and overlay from DOM. To simplify things we ...

Opening Oracle Apex Links in iframe

Image
Starting Oracle Apex 4.1, application pages by default will not open inside an iframe (inline frame). There is a new security setting introduced, which is restricting this feature. As commented by  +Patrick Wolf   in  community.oracle.com  the following setting has to be changed to enable this feature: This is what he had to say: "There is a new security feature to prevent clickJacking attacks. For new applications it's enabled, for existing ones it's disabled. Please see Shared Components > Security Attributes > Browser Security -> Embed in Frames" Keeping this for my reference purposes only.

Oracle Apex: Dynamic Action Bug

I was struggling to find a fix for the problem. Only now I recognized it was a bug in Oracle APEX Version 4.2.3.00.08. The scenario: 1. I have two regions with Interactive & Classical Report 2. When a value is modified in select item in page, I need to refresh these reports. (Used dynamic action to refresh regions on page item change) 3. I used jQuery tabs for the reports ( instructions on how to created it is here ) 4. I modified the Template of the reports to "No Template" 5. The region refresh stopped working. I was assuming that the refresh did not work because of jQuery tabs. But later I realized that the "No Template" caused the bug. To fix this you may either create a new Template or use a region which has a template. I have used the "Borderless Region (no heading)" and the dynamic refresh works. Not sure about this being fixed in later versions of Apex.

Oracle Apex 5 - First impressions

Image
The new age Oracle Apex is here to download. Till 16th April it was only available as a preview in apex.oracle.com. Starting yesterday it is available for download. For the first time, first day first show I could download Apex from otn and install in my local Express Edition database. The installation was smooth only 3 steps. The upgradation steps are clearly mentioned in documentation here . Step 1: Download zip file from otn Step 2: Unzip in folder of your choice Step 3: Run the following command in sqlplus which is connected to sys @apexins.sql tablespace_apex tablespace_files tablespace_temp images As I had not created any tablespaces, I simply ran the following command: @apexins.sql SYSAUX SYSAUX TEMP /i/ Step 4: Login back after the previous step and execute following: @apxldimg.sql APEX_HOME APEX_HOME is the folder containing the unzipped downloaded files of apex. For example @apxldimg.sql c:\ Step 5: Complete upgrade by updating password: @apxchpwd.s...

Custom CSV Download button for Interactive Report

Image
Its a fact, users are lazy. They want to avoid multiple clicks of button. This time it is to avoid clicking on Actions Menu > Download > Click to download CSV. The requirement was to click one button, download the CSV. Oracle Apex allows this using a simple technique. I was searching many blogs, OTN etc where people were asking you to create a new region, then change the settings of the region. Why should I manage two copies of same region? The solution is simple. While creating a button, specify the option " Page in this application ". The page number should be same as the one where the Interactive report is created. (Probably this is one of the reasons why there is a limit of 1 Interactive report in a page). In the Request text field, mention the "CSV" option. That is all you need. Create a button with the Action when button clicked property as above

Interactive Reports - Configure header and footers

Image
Version : Oracle Application Express 4 and above. Recently I had been asked by my colleague to how to configure header and footer for PDF printing of Interactive reports in Oracle Apex. We have been using Apex 4.2.5, but this tip will work for versions above 4. If PDF download is not working in interactive reports in your setup, refer this article to configure PDF printing. By default if you are downloading an interactive report in Oracle Apex, it will only download the data inside the report. It will not print anything which is available in Region header/footer. It is available as a separate option which will help configure attributes while printing. Navigate to your page in developer view, and click on Interactive Report link for the region. Click the Interactive Report link Click on the tab Print Attributes. Click the tab, Print Attributes In this section you will be able to add/modify the following settings: Print Server Override: If you have created a custo...

jQuery tabs within Oracle APEX

This tip was posted in Oracle Apex Knowledge Group by Richard Martens. Its my sincere pleasure in thanking the author for this simple tip. The original blog is available here . I am posting the steps first, and a slight deviation which makes the setup one time only through this article. The idea is to create a region first and all sub-regions as tabs. If this design suits your application then its simple as copy-paste.Create a template Go to Shared Components  Navigate to Templates Press the Create Button Choose Region Choose From Scratch Provide the name jQuery Tabs Choose Custom 1 for template class Press Create button Once the template is created, find the jQuery tabs from the list and click to edit. Paste both the following codes in Definition Section: <div id="#REGION_STATIC_ID#" #REGION_ATTRIBUTES#> #BODY##SUB_REGION_HEADERS##SUB_REGIONS# <div style="clear:both;"></div> </div> <link rel="stylesheet" href=...

Oracle APEX - Remove Show All from region selector

Image
Oracle Application Express (APEX) offers a lot of regions to be displayed in a single page without cluttering the screen display. One such way of making a page to display lot of contents is using the Region Display Selector. In this tip however I am not going to show how to display the "Region Display Selector" but an inherent problem with this control. I have a screenshot of this control in action. I have Five regions in this sample page. For each region this "Display Selector creates a link in its control. As soon as you click a particular region, only that specific region will be displayed. The remaining will be hidden. The "drawback" is that there is no option to hide the first option "Show All". Initially when the page loads the "Show All" will be selected and all regions will be displayed. I think this should be a great feature which should be available in-built within Apex. But as of 4.2.3 version which I am using, this...

PDF Download not working in Interactive Report : Oracle APEX: SOLVED Finally

This was one of my biggest concerns while using Oracle APEX. I will often enable PDF download from Interactive Report setup in a page, but the download was generating only a corrupt file. My google searches also did not yield any result. Then came the news that I have to install BI Publisher in order to use the feature. This message was floating in OTN forums related to this topic. I got disheartened learning this. Why would Oracle provide such a tool if it can't support PDF download by default. Then came the SOLUTION for the problem. In one of documentation available in Oracle's website I found the news I have been searching for a long time. The APEX download (4.2.2) had been shipped with a war file fop.war. This file is available in the folder  apex_4.2.2\apex\utilities\fop The installation instructions mentioned that I need to deploy this war file in OC4J but which requires  Oracle Containers for J2EE (10.1.3.2 or above) [I don't have a clue what this is]. ...

Oracle Apex - Position IR Control Panel items in one line

Image
This mini tip is to help those who does not know CSS much and those who know CSS but do not know where to apply code in Oracle Apex. In Interactive reports by default the control panel items (filters/report titles) etc will be displayed one line below the other. If you have ten filters applied on an IR/Interactive Report then the panel when expanded occupies 10 lines in the report just like the one below: This mini tip will enable you to change this like the one below: If you have a Page 0/Global Page created within your application do not follow step 1. Step 1: Create a Global Page/Page 0 in your application. Step 2: Create a HTML region with template "No template" in this page. Step 3: Add the following CSS inside this region source and save. <style>   table#apexir_CONTROL_PANEL_COMPLETE tr{float:left;padding-right:15px;} </style> This is all you have to do to change Interactive report's control panels visibility option in your entire a...

Oracle APEX: Interactive Report "no data found" while adding attachments link

You must follow the exact steps to add link to attachments in BLOB column in Interactive Report/IR in Oracle APEX: 1. Table must have primary key (I could not make this work with ROWID in View), and it must be queried in the select statement for IR. 2. In query one column must fetch size of attachment. You may use dbms_lob.getlength(blobcolumn) function to fetch the size. 3. In the size column added provide format mast as BLOB and in Apex 4.2.2 "BLOB Column Attributes" section will come. 4. In "BLOB Column Attributes" you must specify at least two columns, BLOB column in "Column" and "Primary Key column 1". If you have composite primary key, you may specify "Primary Key column 2". 5. If you are saving the file name in table, you may also identify the column name in "Filename Column" field. If you are getting " no data found " error in the region of Interactive report, do make sure that the first point mentio...

Sample Application - Table Tennis - Oracle Apex

Image
For educational purposes I had created a sample application. This application is intended to be used within an organization where a table tennis tournament is taking place. The requirements for the application were: There should be provision to create Team and Players (Only doubles tournament was conducted). Team & Players should be entered in Master-Detail format. Matches & Results data should be entered as a tabular format. Match Calendar should be shown. Reports like: Points tally Top 4 teams (who will qualify for semi-finals) The completed application can be downloaded from this link . The E-R diagram for the application (generated out from SQL Developer can be found below). To see more information on generating E-R diagram from SQL developer click here .

Where is my Page Zero? - Oracle Apex

Image
Till Apex 4.1 while creating a page you had an option for creating "Page Zero". This page type is a special master page to your application. If you add any element to this page, automatically the element will be displayed in all pages within your application.

LOVs based on fields in page - Oracle Apex

Image
I was reading about features in Oracle APEX 4.1 in Patrick Wolf's Blog, and I wanted to try it out to see how easy or difficult it is to implement a Select list which dynamically changes based on a different value in the page. I created a sample application with three tables: Country_Master - Stores country id and name State_Master - Stores country id, state id, and name Company_Master - references country id and state id to store company record. My intention was to implement country select list and state select list in company master page. As soon as I select a country states belonging to the country should be refreshed in state select list. The APEX feature used: " Cascading LOV Parent Item(s) "

Oracle APEX Tutorial - 1

Image
Oracle's APEX is a RAD (rapid application development) tool which requires only a web browser like Google Chrome/Mozilla Firefox to develop and deliver "New Age" web based applications. Oracle allows a cloud based website apex.oracle.com to help ourselves familiarise this tool. As of this tutorial the version of APEX in the cloud is 4.2.2. In this cloud website one can apply for a free account. I am going to publish a series of videos helping you to get started with Oracle Apex. In this first of series I will be creating a free account with the cloud based website. Let's see how you can create your account: A simple introduction to Oracle APEX can be seen here .

Oracle APEX : Input Field with ALL Capital Letters

This is a mini-tip on changing characters entered in a text/input field to all Capital letters. A little use of Javascript is required. Navigate to the page where the changes is required. Click on the field/Item for which all capital characters is required. Scroll till you reach Element section and in "HTML Form Element Attributes" mention the following (including quotes): onKeyUp="this.value=this.value.toUpperCase();" Now Click on Apply Changes button and run the page. For the field this attribute is applied, whenever a key is typed the case is changed. But if you dont want this type of animation and just want all characters to be in upper case no matter what, add the following to the text field: style="text-transform: uppercase;" onKeyUp="this.value=this.value.toUpperCase();" To learn more about text-transform click here . The style attribute is a CSS property and applies an all UPPER CASE property to the text field. Even though the...

Oracle APEX - Navigation bar current item

Image
Apex Version 4.0.2 I am using a template where my contents are appearing in one side (left) and navigation in another side (right) of the webpage. I created a "Vertical Sidebar List" template wherein all my navigation items will be embedded inside an un-ordered List. I created this very much easily. First created a List (Application Builder > My Application > Shared Components > Lists (Below Navigation)). The List template as I mentioned earlier is "Vertial Sidebar List". I entered a few pages in the navigation items and created the list. Later on I manually added a List Region to all my pages. I chose the Display Point of "Page Template Region Position 2" for my page contents, and for Menu I chose "Page Template Region Position 3". Thus I was able to list both regions side by side. But the problem I landed on was that when I click on a page the list was not displaying current attribute (or a highlighting). Even after lot of go...

Leave Management System for APEX (LeaveLite)

If you are new to Oracle APEX , well you are opening up a new world. Otherwise you know what APEX can do for you. With the latest version of 4.2 released at least I have lot of dreams with it. I began developing in the age where Client-server applications were dominant. Oracle Forms provided features where it is easy to develop an application within days. With the advent of Web applications Oracle provided various frameworks including ADF, APEX among others. I do not know Java, so I left behind from ADF. APEX seems to be perfect fit for me because it is pure PL/SQL that I have to know. (Though Java script/jQuery skills will be hugely beneficial). To add to this list for a year or so I have been developing website for our client with pure PL/SQL Web Toolkit. With this skill with me it was easy to delve deeper into APEX. With APEX 4.2 I have got more than what I have dreamed of, Mobile Applications. I am sharing with all my readers an application which I have designed and develop...

Oracle APEX 4.2 released

Image
Oracle Application Express 4.2 is released for production. The first and foremost features that got my attention was Application Builder for Mobile. Oracle has understood the importance of mobile web and has scaled to the need very quickly. I was able to create a mobile application without learning much. With only seeing this 2 minute video from Oracle Learning you will also understand how easy it is to create Business standard applications within minutes. The next feature (if you can call it) was the long list of packaged applications within Apex 4.2. I was able to just install a Bug Tracking software and run within 5 minutes. It also includes a Mobile interface. For more information on other features refer Oracle Website .