5 Replies Latest reply on Nov 15, 2010 7:50 AM by j.sieben

    apex 4 plugin refresh respond

    786054
      Hi,

      I was looking throuth the other threads, but could not find an answer to my question:

      Is there a way to make a plugin respond to the new apex 4 dynamic action "refresh"?

      Some data in the database is changed by some other dynamic action on the same page.
      Now the plugin which queries that data should refresh dynamically as well.

      Any help is greately appreciated,

      Marko
        • 1. Re: apex 4 plugin refresh respond
          KartikPatel
          Hi,

          There is no plugins yet to refresh region.

          But this will probably help you to solve the problem:

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

          Regards,

          Kartik
          • 2. Re: apex 4 plugin refresh respond
            Patrick Wolf-Oracle
            Hi Marco,

            that's really simple. Your plug-in just has to register for the apexrefresh event. For example if it's a region type plug-in you would invoke the following code during initialization of the plug-in.
            apex.jQuery("#id-<use value from p_region.static_id>").bind("apexrefresh", function(){ your code });
            In your refresh code you should also trigger the events "apexbeforerefresh" and "apexafterrefresh" with
            apex.jQuery("#id-<use value from p_region.static_id>").trigger("apexbeforerefresh");
            so that users can also bind events to these APEX standard events as well.

            Hope that helps
            Patrick
            PS: You can have a look at the function apex.widget.selectList in */i/javascript/uncompressed/apex_widget_4_0.js* to see how we use this events for cascading LOVs.

            -----------
            My Blog: http://www.inside-oracle-apex.com
            APEX 4.0 Plug-Ins: http://apex.oracle.com/plugins
            • 3. Re: apex 4 plugin refresh respond
              786054
              Hi Patrick,

              that's the kind of thing that I wanted, but I'm not the creator of the plugin (jQuery "sortable" done by sumneva)
              I think I appended your code for the bind at the right place, but I'm not capable (yet) of writing the refresh function for this jQuery plugin.
              (I'm not good in javascript)

              Since right now this is not a critical issue I'll help myself with a full page refresh.

              Thanks anyway for your support,

              Marko
              • 4. Re: apex 4 plugin refresh respond
                Patrick Wolf-Oracle
                Hi Marko,

                write the Sumneva guys a mail, I think that would be an useful enhancement for there plug-in.

                Regards
                Patrick
                -----------
                My Blog: http://www.inside-oracle-apex.com
                APEX 4.0 Plug-Ins: http://apex.oracle.com/plugins
                • 5. Re: apex 4 plugin refresh respond
                  j.sieben
                  Hi Patrick,

                  I was seaching the documentation for the apexbeforerefresh event to find out whether any parameter is passed in.
                  I'm trying to create an item plugin that works similar to your grouped lov but has the ability to save state. Reason for this is that in my application, depending on an entry into another field, the content of the lov will dynamically change but I nonetheless need to keep track of the actual state (which is not necessarily in session state already).

                  I was trying to achieve this by registering the apexbeforerefresh event but don't know how to access the actual state of the lov.

                  Best regards,

                  Jürgen