7 Replies Latest reply on Sep 14, 2011 8:47 AM by NoGot

    $a_report in APEX 4.1

    NoGot
      Hello! Sorry for my english.

      I'm working with APEX 3.1, but today I look for new APEX 4.1 - it is good. I like it!
      But....
      $a_report in 4.1 uses true jQuery.ajax method, but why he can't return ajax.promise object? I need to process some error states by myself (like 404, 503, or timeout).
      Look for apex_4_1.js - it looks like this:

      .........................
      // perform the AJAX call
      apex.jQuery.ajax({
      // try to leverage ajaxQueue plugin to abort previous requests
      mode: "abort",
      .........................
      and so on.

      If add word "*return*" before apex.jquery.ajax - it's will be good like this:

      .........................
      // perform the AJAX call
      return apex.jQuery.ajax({
      // try to leverage ajaxQueue plugin to abort previous requests
      mode: "abort",
      .........................
      and then we can process error conditions by self.
      Why?
        • 1. Re: $a_report in APEX 4.1
          fac586
          884557 wrote:

          I'm working with APEX 3.1, but today I look for new APEX 4.1 - it is good. I like it!
          But....
          $a_report in 4.1 uses true jQuery.ajax method, but why he can't return ajax.promise object? I need to process some error states by myself (like 404, 503, or timeout).
          Look for apex_4_1.js - it looks like this:

          .........................
          // perform the AJAX call
          apex.jQuery.ajax({
          // try to leverage ajaxQueue plugin to abort previous requests
          mode: "abort",
          .........................
          and so on.

          If add word "*return*" before apex.jquery.ajax - it's will be good like this:

          .........................
          // perform the AJAX call
          return apex.jQuery.ajax({
          // try to leverage ajaxQueue plugin to abort previous requests
          mode: "abort",
          .........................
          and then we can process error conditions by self.
          Why?
          Because it's an undocumented, unsupported, internal API that you shouldn't be using.
          1 person found this helpful
          • 2. Re: $a_report in APEX 4.1
            NoGot
            And how i can process ajax errors like 404, 503, timeout etc.?
            • 3. Re: $a_report in APEX 4.1
              NoGot
              How to handle ajax errors???
              • 4. Re: $a_report in APEX 4.1
                jariola
                Hi,

                Just question why you need do that?
                As you have already told $a_report is not documented internal function where you should not touch.

                Regards,
                Jari
                • 5. Re: $a_report in APEX 4.1
                  NoGot
                  Hi.

                  My application works unattended (touchscreen info kiosks), and i need to handle all errors.

                  If client will see at the part of our page, region with browser error message - it will look bad.
                  • 6. Re: $a_report in APEX 4.1
                    jariola
                    Hi,

                    Ok,

                    Maybe you do custom report using PL/SQL region so you have full control.
                    This might help on that
                    http://dbswh.webhop.net/dbswh/f?p=BLOG:READ:0::::ARTICLE:97800346956448

                    Regards,
                    Jari
                    • 7. Re: $a_report in APEX 4.1
                      NoGot
                      Thanks!

                      Very good idea.