This discussion is archived
7 Replies Latest reply: Jan 15, 2013 7:31 AM by MarkMi RSS

Classic report column sorting

MarkMi Newbie
Currently Being Moderated
Hello to APEX forum
My Apex version is 4.2.1,
database version is Oracle 10g XE on Windows 7 Pro

After upgrading from version 3.2 to 4.2.1 report column sorting doesn't work when "Enable Partial Page Refresh" is set to "Yes".
When "Enable Partial Page Refresh" is "No" sorting is OK.

Please, help

Regards

Mark
  • 1. Re: Classic report column sorting
    MarkMi Newbie
    Currently Being Moderated
    Hello,

    Anyone has idea if it's a APEX new version bug or a specific application problem?

    Thanks

    Mark
  • 2. Re: Classic report column sorting
    Patrick Wolf Employee ACE
    Currently Being Moderated
    Hi Marc,

    can you please provide an example on apex.oracle.com so that we are able to reproduce it.

    Thanks
    Patrick
    -----------
    My Blog: http://www.inside-oracle-apex.com
    APEX Plug-Ins: http://apex.oracle.com/plugins
    Twitter: http://www.twitter.com/patrickwolf
  • 3. Re: Classic report column sorting
    MarkMi Newbie
    Currently Being Moderated
    Thanks Patrick,

    I'm very appreciating your help.

    I followed your advice and created example on apex.oracle.com and I saw that sorting works there. So I concluded it's upgrade or application specific problem.
    After several unsuccessful manipulations I made copy of my application and got proper sorting in this copied application.

    So I have workaround for my problem.

    Thank you very much - sometimes the only thing you need it's small push.

    P.S. By the way I've applied some stuff from your blog
  • 4. Re: Classic report column sorting
    Patrick Wolf Employee ACE
    Currently Being Moderated
    Hi,

    good to hear that it's working now.
    And it's always good that some of my blog postings are valuable to others. :-)

    Regards
    Patrick
    -----------
    My Blog: http://www.inside-oracle-apex.com
    APEX Plug-Ins: http://apex.oracle.com/plugins
    Twitter: http://www.twitter.com/patrickwolf
  • 5. Re: Classic report column sorting
    983552 Newbie
    Currently Being Moderated
    Hi Patrick,

    unfortunately the problem persists, but now it seems that the reason is JSON stuff being in use in application.

    When I copied application json static file that was assisgned to specific application wasn't copied along with the rest of application and sorting worked properly in copied application.

    But then I found out that some functionality which uses json stopped to work, so I added static file to shared objects and sorting stopped to work also in the copied application.

    I have reference to json in page template like this

    <script src="#APP_IMAGES#json.js" type="text/javascript"></script>

    I reproduced it on apex.oracle.com

    workspace: MMWspace
    username: MARK.MISH@GMAIL.COM
    password: sewanun9

    Thanks

    Mark
  • 6. Re: Classic report column sorting
    Patrick Wolf Employee ACE
    Currently Being Moderated
    Hi Mark,

    it looks like your json.js causes troubles. It extends every JavaScript "object" with two methods called toJSONString and parseJSON. I did a quick debugging and it looks like when we construct our AJAX request to do the sorting, the jQuery AJAX handling tries to serialize those two function because it thinks it's regular data and fails with a JavaScript error.

    Looking at the original source of your library at https://github.com/douglascrockford/JSON-js even the creators had some doubts using that version of the library
    json.js: This file does everything that json2.js does. It also adds a toJSONString method and a parseJSON method to Object.prototype. Use of this file is not recommended.
    Are you sure that you need the parseJSON and toJSONString methods? Maybe you are fine with json2.js as well.

    Regards
    Patrick
    -----------
    My Blog: http://www.inside-oracle-apex.com
    APEX Plug-Ins: http://apex.oracle.com/plugins
    Twitter: http://www.twitter.com/patrickwolf
  • 7. Re: Classic report column sorting
    MarkMi Newbie
    Currently Being Moderated
    Hi Patrick,

    Thank you very much for your help.

    It's OK now both with sorting and json functionality.

    I followed your advice and added json2.js static file to shared objects of my original application.

    Now I'm using JSON.parse() instead of parseJSON() and it's OK.

    Thank you and sorry for using another user (by mistake) in previous post - I have registered twice with two different accounts.

    Best regards

    Mark

Legend

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