This discussion is archived
13 Replies Latest reply: Jan 10, 2013 5:35 AM by Patrick Wolf RSS

Page process on page 0

Kirsten Newbie
Currently Being Moderated
Hello,

I want to call a plugin of type process from page 0. Is there a possibility to do this?


(APEX 4.0.2)

Thank you,
Kirsten
  • 1. Re: Page process on page 0
    evrm Pro
    Currently Being Moderated
    Hi Kirsten,

    first create your plugin of type process.
    Then on page 0 press the button Create => "Page control on this page" on the right hand-side of the top-bar.
    Choose Process and on the following screen choose Plug-ins and select you plug-in.
    Follow the steps of the wizard to complete the process.

    regards,
    Erik-jan
  • 2. Re: Page process on page 0
    Kirsten Newbie
    Currently Being Moderated
    Hi Eric-Jan,

    thank you very much. That was what I was looking for.

    Kirsten
  • 3. Re: Page process on page 0
    Kirsten Newbie
    Currently Being Moderated
    Hi Erik-Jan,

    I created the page process on page 0, but when I want to call it nothing happens.
    If I add the same page process on page 1 it works.
    I don't think that the problem is code-related. I tried with pl/sql-process - on load before header

    Begin
    HTP.p('Hallo world');
    end;


    Do you have any idea where the problem could be?

    thank you,
    Kirsten

    Edited by: Kirsten on 07.01.2013 02:25
  • 4. Re: Page process on page 0
    Kirsten Newbie
    Currently Being Moderated
    ..

    Edited by: Kirsten on 07.01.2013 02:26
  • 5. Re: Page process on page 0
    evrm Pro
    Currently Being Moderated
    Hi Kirsten,

    you cannot call a page process on page 0.
    Page 0 acts like a global page.
    See this http://docs.oracle.com/cd/E37097_01/doc/doc.42/e35125/ui_allpgs.htm#sthref1937 for more info.

    The pl/sql process you tried on page 1 has a processing point of "on load before header" which is not available on page 0.

    regards,
    Erik-jan
  • 6. Re: Page process on page 0
    Kirsten Newbie
    Currently Being Moderated
    But how can I call a plugin of type process on every page-load (if REQUEST = ...) of all pages?

    I don't want to include the plugin on every page manually. I tried this and it works.
    But now I'm looking for a smarter solution.

    Thank you very much for your efforts,
    Kirsten
  • 7. Re: Page process on page 0
    evrm Pro
    Currently Being Moderated
    Hi Kirsten,

    you could of course use a condition of REQUEST=... and combine this, when you only want the process to run on some pages, with the conditions "Current Page..."
    Another option would be to use an Authorization Scheme with some smart logic regarding the REQUEST and Current Page (APP_PAGE_ID)

    regards,
    Erik-jan
  • 8. Re: Page process on page 0
    Kirsten Newbie
    Currently Being Moderated
    Hi Erik-Jan,

    but I still don't know how to call the plugin without incluging it manually on every page.

    Do you know any solution?

    Thank you,
    Kirsten

    Edited by: Kirsten on 08.01.2013 04:08
  • 9. Re: Page process on page 0
    Patrick Wolf Employee ACE
    Currently Being Moderated
    Hi Kirsten,

    what kind of process type plug-in are you calling? Could you implement the same logic in a PL/SQL package and call it from an application process?

    Regards
    Patrick
    -----------
    My Blog: http://www.inside-oracle-apex.com
    APEX Plug-Ins: http://apex.oracle.com/plugins
    Twitter: http://www.twitter.com/patrickwolf
  • 10. Re: Page process on page 0
    evrm Pro
    Currently Being Moderated
    Hi Kirsten,

    you could also create a dynamic action on page 0 for the event Page Load and Execute PL/SQL code as the action.

    regards,
    Erik-jan
  • 11. Re: Page process on page 0
    Kirsten Newbie
    Currently Being Moderated
    Hi Patrick,

    I use the plugin "(IR) Report to Excel (xlsx)" which I found in APEX-PLUGIN.com I did some adaptations to do the output on multiple sheets.
    I expanded the action menu of interactive reports by the point "Download to xlsx" (dynamic action on page 0).

    Everthing works great if I include the plugin on a page. The only problem is, as described above, that I don't want to include the plugin manually on every page.

    Now I try, as proposed, to put the code into a package but by now I wasn't successful.

    Best regards,
    Kirsten

    Edited by: Kirsten on 09.01.2013 01:53

    Edited by: Kirsten on 09.01.2013 01:55
  • 12. Re: Page process on page 0
    Kirsten Newbie
    Currently Being Moderated
    Hi Patrick,

    I still try to put the code of the plugin into a package but I don't know how to replace the apex_plugin_util-functions and procedures:
    apex_plugin_util.get_data2
    c_data_type_date

    Or is it possible to call them in a package and I'm missing some things because it doesn't work.

    Do you have any tip?

    Thank you for your help,
    Kirsten
  • 13. Re: Page process on page 0
    Patrick Wolf Employee ACE
    Currently Being Moderated
    Hi Kirsten,

    you don't have to replace apex_plugin_util, it should work fine in your package.

    Regards
    Patrick
    -----------
    My Blog: http://www.inside-oracle-apex.com
    APEX Plug-Ins: http://apex.oracle.com/plugins
    Twitter: http://www.twitter.com/patrickwolf

    Edited by: Patrick Wolf on Jan 10, 2013 2:35 PM

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points