4 Replies Latest reply: Aug 24, 2014 11:11 PM by Tony F. RSS

    Refresh region and item

    Ziut

      Hi

       

      I have on a page region with report (classic) and item. Data in report are changing every 5 sec. I would like to refreshing this region without using button (report and item).

       

      For region (footer) I create javascript:

       

      <script type="text/javascript">

      <!--

        setInterval("jQuery('##REGION_ID#').trigger('apexrefresh');", 5000);

      //-->

      </script>

       

      And it works fine only for report. For item (inside this region)  - no.

      How refresh item automatic?

       

      Item is build as select query from db and every 5 sec should be refresh. I tryed use:

       

      <script type="text/javascript">

      <!--

        setInterval("jQuery('#P2_CURRENT_VALUE#').trigger('apexrefresh');", 5000);

      //-->

      </script>

       

      ...but no result.

      I am not strong in javascript.

      Regards

      Ziut

        • 1. Re: Refresh region and item
          Tony F.

          Hi Ziut,

           

          The fact that your report region refresh is working fine, i.e. every 5 secs, in order to also refresh your page item within the region, I would create a Dynamic Action that is triggered off on "After Refresh" of this report region and within there, create one refresh page item TRUE ACTION for your P2_CURRENT_VALUE page item.

           

          Give this a go and let us know how you go.

           

          Tony.

          • 2. Re: Refresh region and item
            Ziut

            Hi

             

            ... is triggered off on "After Refresh" of this report region...

             

            That is it!!!

             

            You may see my app:

             

            https://apex.oracle.com/pls/apex/f?p=257

             

            for javascript expert:

             

            I would like to change colour of item (backround or text) as pseudo code:

             

                if item.colour = 'red'

                  change item.colour = 'green'

                else

                  change item.colour = 'red'

                end if;

            Regards

            Ziut

            • 3. Re: Refresh region and item
              fac586

              Ziut wrote:

               

              for javascript expert:

               

              I would like to change colour of item (backround or text) as pseudo code:

               

                  if item.colour = 'red'

                    change item.colour = 'green'

                  else

                    change item.colour = 'red'

                  end if;

              This is completely unrelated to the original question, which has now been answered. Please post it in sufficient detail as a new thread.

              • 4. Re: Re: Refresh region and item
                Tony F.

                Hi Ziut,

                 

                Just curious - was my answer correct as you wrote down:

                That is it!!!

                 

                It is appearing as " Assumed Answered." ?

                 

                Thanks.

                Tony.