Oracle Forms 11g and Apex using external events

I remembered an old post of Roel Hartman where he integrated a form into apex.
He used a part of OraFormsFaces by Wilfred van der Deijl: the CommunicatorBean.
Using this CommunicatorBean forms could react on “external messages”.
Now with Forms 11g reacting on external events, this CommunicatorBean isn’t necessary any more(sorry Wilfred).

This is how I did it using external events…
First things first: set up the advanced queueing mechanism.
Check this tutorial which includes setting up advanced queueing.
I created a little form based on emp(nothing fancy)…

The new feature in forms:

With the following properties:

What should forms execute when this event happens?
This has to be specified in the When-event-raised trigger.

In this case we retrieve the payload and extract the empno from it.
The empno is used to set the default where clause on the block.
When there’s an empno on the queue, forms will query that employee.
That’s all for the forms part…
Now I created a little Apex page with two regions:

The Employee details will be our form.
So I put our form in the HTML using an iframe:

Using a “select list” it’s possible to select an employee.

This is the result:

Now the purpose of the select list is to choose an employee and show the detail information in our form.
In order to do this, the select list calls a javascript function.

This javascript function is created in the HTML header

The code behind this:

<script language=”JavaScript” type=”text/javascript”>
function getEmployee (){
var emp = $x(‘P2_EMPNO’);
// send request
var ajaxRequest = new
htmldb_Get(null,&APP_ID.,’APPLICATION_PROCESS=get_emp’,0);
ajaxRequest.add(‘P2_EMPNO’,emp.value);

// get response
ajaxResult = ajaxRequest.get();
ajaxRequest = null;
}
</script>

This javascript function calls an application process and uses the empno as parameter.
The application process put the empno on the queue.

When changing the select list, the form is queried

This is a solution to integrate forms into another application whether it’s Apex, ADF or another web applicaton.
When it can put something on the queue, forms can react on it.
And yes, I could do it using the javascript feature in Forms 11g. I know…
And for Apex it’s probably a better solution, as we can skip the AQ part and make calls to and from forms in Javascript.

Oracle Open World 2010: Forms in the Middle of Middleware

People attending Open World to have a closer look at fusion technologies and how to integrate them in your existing applications, need to check out the following session:

  • ID#: S315945
  • Title: Oracle Forms in the Middle of Middleware with Oracle Product Management
  • Track: Application Servers, Application Grid, and Development
  • Date: 22-SEP-10 Time: 13:00 – 14:00
  • Venue: Marriott Marquis Room: Salon 9

Together with Grant Ronald we will talk you through the possible scenario’s to modernize your existing forms applications. After each scenario we will demo the functionalities and showcase some of the success stories we’ve conducted together with our benelux customers.

The different scenario’s include upgrading to 11g to use the event-driven architecture, integrate with existing applications such as apex, .net, google maps, bpel, …

In other words if you’re using fusion technologies such as BPEL, OSB, ADF, … you can easily integrate these with your existing forms applications using the new features provided in 11g.

APEX 4.0: Export feedback, take it to the next level

Team development is one of the new features of APEX 4.0, one option to use with this feature is Feedback. In short, Feedback allows users to easily report “bugs” for an application. (Like we APEX developers can program bugs… NOT!).

There are already 2 blog posts that cover the way you can add a feedback page to your application and how to access your feedback as developer.

This blog post will describe how you would export your feedback from a production system to the development system where you as developer try to make/solve things. After changes are made you want to inform your users what has been modified…

1. Setting your environment variables
The first thing you have to check before you want to export/import feedback, is the name of your workspace. If you use the same name for a workspace in both environments then we will have to distinct the development environment from the production environment. If you don’t do this, the export/import feature for feedback will not work. You can distinct the environments by altering the Feedback Synchronization Source Identifier, this will default be the name of your workspace. Changing the identifier can be done by using the Internal workspace -> Manage Workspace -> Workspace Details -> Edit Workspace Information.

Continue reading

ApEx 4.0: Date Picker Item Minimumdate and Maximumdate

One of the big improvements of ApEx 4.0 in my opinion is the rebirth of the date picker Item. The old version of the date picker was a popup that opened a calender, it was ok but a lot of developers already used something more sexy like the jQuery Ui Datepicker. This required some custom development and was’t out of the box functionality.

In ApEx 4.0 the date picker got a new look and feel based on the jQuery Datepicker. It opens a lot faster and is overall more simple to use. You don’t have to create a validation anymore to check if the user has specified a valid date, this is done automatically.

Some new properties are available for the date picker:

Continue reading

ApEx Export Interactive Report: tip or security issue?

Exporting an Interactive Report in one click is possible, you don’t have to use the right menu witch can save your user 3 clicks!

To accomplish this you have make a branch to the page containing an Interactive Report and play around with your Page Request:
– CSV
– RTF
– PDF
– XLS
– HTMLD (ApEx 4.0 Only)

Although this sounds actually very nice, it becomes less nice when I try to disable the export for an Interactive Report.

Even when I disable every option for the Interactive Report, it still will allow me to download all the data when playing around with the page request.

Maybe not a critical issue but definitely something to take in account when you use a lot of Interactive Reports.

ApEx 4.0: Websheet Objects

When creating a new workspace you might have noticed that there will be some extra tables on your schema.
All these table start with the name APEX$_ and are used for the websheets feature of the new version of ApEx.

If you don’t use websheets (at start) and you don’t want these extra tables present on your schema then you can prevent the creation of these tables by following the next steps:
– Login into the internal workspace
– Go to Manage Instance -> Feature Configuration
– Set “Create Websheet objects in new workspaces” to No

Please keep in mind that the above action will still allow developers to make websheets. If these objects do not exist then the developer will see a warning message when he/she tries to create a websheet. You then will able to create these objects again:

If you have the Websheet Objects on your schema and you wish to remove them then go to “
Home -> Administration > Manage Service -> Websheet Database Objects” and there you can safely remove these objects.

ApEx 4.0 Quick Picks

A feature that hasn’t been highlighted much is the Quick Pick functionality with items of type “Popup LOV” and “Select List”.

This features enables you to make a quick choice from the the list values in the LOV. Only downside is that you can’t use a query or function that returns the Quick Picks. However you can still reference to other items using the &MY_ITEM. notation.

This is how you set it up:

This is the result:

ApEx 4.0 Region Selector

Last year on ODTUG I did a presentation where I showed my own implementation of region tabs. These are extra buttons to display regions in a more user friendly way. Suppose you have a lot of regions on your page then you could present a list of buttons, each button will show/hide a region.

I’m pleased to announce that in ApEx 4.0 you can do this declarative by using a new region type: “Region Display Selector”.
To set it up just follow these simple steps:

- First alter any existing region on your page and set the Region Display Selector to YES. You can find this setting under Region Attributes.

Region Display Selector

- Make a new region of type Region Display Selector

Region Type Display Selector

- You can add more regions to the display selector by setting the Region Display Selector to YES

Region Type Display Selector

You can see my own implementation of region tabs in the next photo gallery: