Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Dynamic action -> PL/SQL code to call application process?

Jaydarp-OracleAug 4 2014 — edited Aug 6 2014

Hi,

     I am having an issue...

     Have to create a dynamic report, very specific, which means I have to manually draw it by using html... (templates won't work because of the characteristics of this report).

     Now, I am facing 2 problems...

          1- I am not being allowd to create a proc/pkg/table/etc (any object) in the referenced DB schema (nor other that can communicate with it).

          2- The amount of pl/sql code that would display the table correctly, does not fit the "execute PL/SQL code" section of a dynamic action. (I can, however, save all that coding into an application process).

     All I want is upon clickin on a button, execute my dynamic action to refresh the html region with the generated html that comes from this pl/sql code.

     So, is there a way to execute an application process through dynamic action, that wold save the information in the html ID "div" tag I need?

     Or is any other way to do this and to make it refresh?

     I have also already tried the creation of a region with anonymous pl/sql block, but dynamic action - refresh won't refresh a thing.

     I need help!

     Thanks in advance!

Comments

Scott Wesley

Yes, Tom has a good breakdown here

Tom's Blog: Ajax in Apex: introduction and techniques

some examples

Tom's Blog: Ajax calls in apex: examples

And I have sample page that demonstrates techniques, check top of page source

https://apex.oracle.com/pls/apex/f?p=73000:33:0::NO:::

In regard to you not being allowed to create PL/SQL in the database - that is extremely restrictive for an APEX application, which is basically PL/SQL itself. It will impact performance and maintainability, and there has been a recent discussion here

Scott.

Jaydarp-Oracle

Hi,

     But I am not sure any of this helps me.

     For starters, Tom's blog explains how to call from javascript an application process, when what I was asking was how to call an applicaton process from within a pl/sql code triggered by a dynamic action.

     On the other hand, let's assume that calling by jscript an application process works for me... problem is, this application process has a very very very lengthy amount of chars, of the sort htp.p( ) to build up a set of tables there. I mean, the return from that htp.p is REALLY big. How can I put that info, inside  a  <div id="my_div"> <div>  section? Because I am not sure on how to do that... would a simple getElementById("my_div").innerHTML work? I mean, is very very big the string genereated through the htp.p (and I know because I still need to set a some sort of pagination because it won't ever be able to do it for the full length of the information I have)...

     Finally, I agree, not having an access to build up my pl/sql code is very restrictive (and would be the best solution to my dilema), but I am not the DBA and I have already asked... so, can't do anything else about. it.

     Regards!

Scott Wesley

I recommend you read it again, he is talking about invoking PL/SQL processes from within JavaScript.

These PL/SQL processes can be on demand processes defined as an Application Process or an AJAX Callback within the page.

I would ask for the reasons behind not being able to compile packages. Seems extremely inhibitive for an Oracle application and the DBA should know better.

Jaydarp-Oracle

Hi again,

     I got it to work. But still have one issue.

     In the APPLICATION PROCESS, I have a  code like:

          : PXX_ITEM := 3;

     In the middle of al the "htp.p()" coding there.

     Problem is, I cannot find a way to return that value of : PXX_ITEM, since it seems though I can use it in the application process, it won't change it.

     Any suggestion?

     Thanks.

Mohannad

You can return this value by htp.p(:PXX_YYYY).

fac586

jaydarp wrote:


     I am having an issue...

     Have to create a dynamic report, very specific, which means I have to manually draw it by using html... (templates won't work because of the characteristics of this report).

That's a challenge. Please explain why a standard report and templates "won't work". That is very rare in my experience.

     Now, I am facing 2 problems...

          1- I am not being allowd to create a proc/pkg/table/etc (any object) in the referenced DB schema (nor other that can communicate with it).

That's not a challenge, it's a stupid restriction. Why this is the case? How does whoever is responsible justify it? Would they tell a Java developer that they couldn't create classes?

1 - 6
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Sep 3 2014
Added on Aug 4 2014
6 comments
4,657 views