This discussion is archived
1 2 3 4 Previous Next 53 Replies Latest reply: Nov 10, 2008 6:53 AM by StewStryker Go to original post RSS
  • 15. Re: Partial refreshing of pages in 2.0 ?
    357241 Oracle ACE
    Currently Being Moderated
    Hello

    Sorry I forgot that it does use auto update solution does use the html_PPR_Report_Page function but rember this is specifc for reports because it fasttracks to the report engine without going through the whole page layout and condiitons logic.

    That being said.

    http://htmldb.oracle.com/pls/otn/f?p=11933:40

    There you go.

    Carl
  • 16. Re: Partial refreshing of pages in 2.0 ?
    VANJ Journeyer
    Currently Being Moderated
    Very slick! Thanks.

    Any way to not hardcode the long numeric region id in the Javascript?

    "Use the PPR template for the report and change the header section"

    Also, if I use the PPR report template, the region header already has all the stuff in there, right? So I dont need to put that in myself, do I?

    Thanks
  • 17. Re: Partial refreshing of pages in 2.0 ?
    357241 Oracle ACE
    Currently Being Moderated
    Hello,

    At some point the report id needs to be provided you could easily make it a js variable in the page instead of hardcoded into the js.

    The htmldb:href link and id on the report table need to be added to the report template to make it work.


    Carl
  • 18. Re: Partial refreshing of pages in 2.0 ?
    Learco Brizzi Oracle ACE
    Currently Being Moderated
    Carl,

    That looks very nice! Thanks.

    Learco
  • 19. Re: Partial refreshing of pages in 2.0 ?
    423655 Newbie
    Currently Being Moderated
    Instead of refreshing based on time, Can this code be used to refresh upon demand? I see you haven't updated your application export for this, Carl, and I would like to see the back-end of this to try to achieve my result
  • 20. Re: Partial refreshing of pages in 2.0 ?
    357241 Oracle ACE
    Currently Being Moderated
    Hello,

    I added a link to refresh on demand on that page.
    I'll update the export a little later today.

    Carl
  • 21. Re: Partial refreshing of pages in 2.0 ?
    423655 Newbie
    Currently Being Moderated
    Hey Carl,
    First let me thank you for all your help, your insight has proven invaluable in what I am trying to do. This "report refresh" , can it be used to display a report based on a value in a text box w/o a submit (like I was trying to do here unsuccessfully) http://htmldb.oracle.com/pls/otn/f?p=27948:4

    And just a reminder if you can get the application export up soon.

    Thanks,
    Scott
  • 22. Re: Partial refreshing of pages in 2.0 ?
    423655 Newbie
    Currently Being Moderated
    I got the partial page refresh working, however, it does not update based on my text field. Tried fixing the URL in the PPR region to use the value of the text box, still can't get it working, any ideas on how to implement this???
  • 23. Re: Partial refreshing of pages in 2.0 ?
    357241 Oracle ACE
    Currently Being Moderated
    Hello,

    Yes thats not going to work. The auto refresh code is directly tied to the pagination code it expects a report to already be in the page, and then fast tracks to the report engine instead of going through page logic.

    I'll have an example for you in next day or so.

    Carl
  • 24. Re: Partial refreshing of pages in 2.0 ?
    357241 Oracle ACE
    Currently Being Moderated
    Hello,

    Here's the example.

    http://htmldb.oracle.com/pls/otn/f?p=11933:48

    I'm working up all the howto code right now probably be up by tommorow. I'll also be putting up a new export of my app tommorow.

    Carl
  • 25. Re: Partial refreshing of pages in 2.0 ?
    VANJ Journeyer
    Currently Being Moderated
    Carl, that is simply brilliant! Simple and elegant. Thanks.
  • 26. Re: Partial refreshing of pages in 2.0 ?
    423655 Newbie
    Currently Being Moderated
    Carl,
    Looks like what I want, will work with a text box as well I assume.

    Thanks,
    Scott
  • 27. Re: Partial refreshing of pages in 2.0 ?
    423655 Newbie
    Currently Being Moderated
    Hey Carl,
    When will you have the "to-do" ready for this?

    -Scott
  • 28. Re: Partial refreshing of pages in 2.0 ?
    357241 Oracle ACE
    Currently Being Moderated
    Hello,

    All the code is on the page now. http://htmldb.oracle.com/pls/otn/f?p=11933:48

    So basically this is just a slight variation on using an application process but instead you are pulling a region on a page.

    This example contains 2 pages page 48 which is the visible page and page 47 which contains the SQL report.

    Page 47 has a special page template that has most extraneous html removed basically your going to be pulling the whole page even though you are only going to use a small section, (this will be greatly simplified/improved in future HTML DB version) so you want the page template and region templates to bare minimum. In this example the region doesn't even have a template assigned.

    Pulling the whole page has the disadvantage of pulling much more html across the wire than you need but as the advantage of allowing you to use all standard HTML DB page functionality, computations,process,conditions,templates so there is a trade off.
    If you are only interested in speed you could use an ondemand process in much the same way and build your own report.

    Now some things to notice with the javascript usage

    var get = new htmldb_Get(null,&APP_ID.,null,47);

    When using with an application process you usually go to page 0 here because we are grabbing a substring of page html we are going to page 47

    gReturn = get.get(null,'<htmldb:BOX_BODY>','</htmldb:BOX_BODY>');

    This deals directly with the special page template for PPR pull's it should have unique substring's for clipping out the text you want. To make it easy I create tags with a htmldb: namespace with the name of the specific region, we don't use any xml dom stuff because more than likley the page you pull from will not be properly formed xml.

    You can even get cut down more on the html over the wire by using one region for the whole page but I like to do things generic also then you can make more complex region pulls where you are pulling multiple regions across region substitution tags.

    The main problem you can have with this is that you want to make sure not to get the <form> tag included in your substring as that will break the submit functionality on the calling page.

    Carl
  • 29. Re: Partial refreshing of pages in 2.0 ?
    423655 Newbie
    Currently Being Moderated
    Looks nice Carl, can you update the export please when you get a chance as well?

    Thanks,
    Scott