Sunday, November 9, 2008

Oracle Apex IRR in ExtJS Popup Window

Dimitri Gielis emailed recently asking if I'd embedded an Ineractive Report Region (IRR) in a ExtJS popup window.

Well no I hadn't - but it turned out to be straight forward in the end, as you can see in this demo.

He raised an interesting point that when he tried the IRR javascript failed (filtering, sorting etc).

I believe Dimitri had been referencing the apexir_WORKSHEET_REGION div when embedding the IRR in a window, whereas I added an extra div tag around the IRR and used that instead.  

Such a small difference, such a big impact. The next screenshot shows some of the ExtJS windows html with my extra div tag wrapping the IRR.


Here is the html when referencing the apexir_WORKSHEET_REGION div.


So what's happened?

The apexir_rollover div (containing the filters etc) is no longer just below the apexir_WORKSHEET_REGION div. The relative positioning of these divs makes a difference.

Applying ExtJS functionality to existing html often results in html tags being moved around. Something to remember when you get unexpected behaviours.

4 comments:

Anonymous said...

this is very nice. thank you for sharing. do you know of a way to get the report content in an ext grid?

Dimitri Gielis said...

Hi Mark,

Thanks for your post, but the problem I'm facing is not the same as what you explain here.

The div apexir_rollover is taken into account (I also wrap another tag around). The problem is I call an IRR on another page.

The way I see it is, the javascript of the IRR is trying to access the parent page and not the popup.

Dimitri

Mark Lancaster said...

For anyone reading the comments.

Dimitri and I have followed up in private emails, and have concluded the following.

This is not an ExtJS specific issue.

Calling a functional IRR from another page is not possible using the Apex 3.1 javascript files.

In 3.1 the javascript uses the pFlowStepId hidden item for worksheet functionality.

You could possibly edit to work around this, but this would be unsupported by Oracle.

-----------------------------
In reply to anonymous, yes I know a few ways to get report content in an ext grid.

1. create a region template containing code from the grid-from-markup example.
2. write a plsql package to generate the code (a lot of work).

I'm experimenting with the second option, trying to come up with a reusable solution.

But with all the worksheet functionality available now, and coming in 4.0 - I don't have a driving need to do it.

Anonymous said...

I was copying JS code into page1 and looking only button -Show Window-
Whats need for display selected column from tables ?