5 Replies Latest reply on Jan 16, 2019 7:44 AM by Ahmed Haroon

    Problem with page refresh after click on media list row

    Yvo Breuer

      Hello community,

       

      I have the following use case:

       

      1. Page 1: IR with rental agreements. Selecting one opens page 2.
      2. Page 2: This is a Classic Report with related terms to the selected rental agreement. This has the Media List template.
      3. When clicking an occurence of the list I want to refresh the page so that the info in the other regions on this page is based on the id of the selected list row.

       

      Steps 1 and 2 are correct. Step 3 goes wrong when I want to refresh the page. I've tried a lot, but somehow I keep making mistakes and I end up with errors like "Ajax call returned server error ORA-01403: No data found. for Execute PL/SQL Code." or the page seems to refresh but the other regions are not based on the id of the selected list item. I've tried so many things that I can't recall them all anymore.

       

      In my last attempt I tried the following:

      • I've created a hidden item P2_CURRENT_ID.
      • Via the #LINK# column in my query I set the value of this hidden item via:

      'javascript:$s(' || chr(39) || 'P2_CURRENT_ID' || chr(39) || ',' || id || ');' as link

      • I've created a Dynamic Action at the on change event of the hidden item. Then I do the action Refresh on the jQuery selector body.
      • This results in nothing. Not even an error. Neither in the console. Probably due to a wrong selector.

       

      I'm a bit blind after all the things I've tried. I guess I need a different approach. So please provide me some clear steps to achieve what I want.

       

      By the way, we're on APEX 18.2 with Oracle 12cR2.

       

      Kind regards, Yvo

        • 1. Re: Problem with page refresh after click on media list row
          fac586

          Yvo Breuer wrote:

           

          Hello community,

           

          I have the following use case:

           

          1. Page 1: IR with rental agreements. Selecting one opens page 2.
          2. Page 2: This is a Classic Report with related terms to the selected rental agreement. This has the Media List template.
          3. When clicking an occurence of the list I want to refresh the page so that the info in the other regions on this page is based on the id of the selected list row.

           

          Steps 1 and 2 are correct. Step 3 goes wrong when I want to refresh the page. I've tried a lot, but somehow I keep making mistakes and I end up with errors like "Ajax call returned server error ORA-01403: No data found. for Execute PL/SQL Code." or the page seems to refresh but the other regions are not based on the id of the selected list item. I've tried so many things that I can't recall them all anymore.

           

          In my last attempt I tried the following:

          • I've created a hidden item P2_CURRENT_ID.
          • Via the #LINK# column in my query I set the value of this hidden item via:

          'javascript:$s(' || chr(39) || 'P2_CURRENT_ID' || chr(39) || ',' || id || ');' as link

          • I've created a Dynamic Action at the on change event of the hidden item. Then I do the action Refresh on the jQuery selector body.
          • This results in nothing. Not even an error. Neither in the console. Probably due to a wrong selector.

           

          I'm a bit blind after all the things I've tried. I guess I need a different approach. So please provide me some clear steps to achieve what I want.

           

          It is not possible to refresh an entire page using a jQuery body selector.

           

          Instead, create individual Refresh actions for each affected region.

           

          Note that not all region types are refreshable. PPR is only available for classic reports, interactive reports and grids, charts, and region plug-ins that support it.

          • 2. Re: Problem with page refresh after click on media list row
            Yvo Breuer

            Thanks fac586 for your prompt reaction. It did not solve my problem actually, but in the end it led me in the right direction.

            • 3. Re: Problem with page refresh after click on media list row
              Ahmed Haroon

              a senior fac586 actually directed you in right direction, it actually solved your problem

              • 4. Re: Problem with page refresh after click on media list row
                Yvo Breuer

                Well Ahmed Haroon, to be honest, it did not solve my problem. But I tried to be polite as I really appreciate it a lot that someone tried to help me.

                Besides to that I learned about the body selector as well and I thought that fac586's suggestions could still help other people that encounter problems due to such a selector. So that was another reason to mark it as correct.

                Later, after I contacted someone outside this forum, I found out that this was not the root cause of my problem. We shared a TeamViewer session, I explained in detail my application and what I wanted to achieve. He asked me the right questions which made me see my mistake. I just introduced this selector during one of my attempts to solve my problem. But when I got it solved, I didn't need it anymore.

                • 5. Re: Problem with page refresh after click on media list row
                  Ahmed Haroon

                  thanks for showing positive attitude. can you post what steps you took to solve the problem to help others too? this will be a great help and off course your contribution to this Community where various people come to actually Learn 

                  regards