3 Replies Latest reply: Jan 10, 2014 9:19 AM by Nicolette RSS

    Dynamic action - condition

    3ds

      APEX 4.2.2

      Database 11g

      Theme 101

       

      Hi all,

       

      I have a dynamic action on a page.

       

      Event : Manual Close [Skillbuilders Modal Page 2.0.0]

      Selection Type : DOM Object

      DOM Object : Manual

       

      True Actions :

      Execute JavaScript - window.location.reload();

       

      Condition : Value of Item / Column in Expression 1 is NOT NULL

      Expression 1 : P0_STATUS

       

      Here I am having the problem. P0_STATUS is a Page 0 item. The value of it is set at the Modal Page. My requirement is, as soon as I close the modal window, it should refresh the page. But with this condition, it is not.

      If I remove the Condition, making it None, it does refreshes the page.

       

      I tried with, Page item / Global Parameter / Page 0 item. None of is working.

       

      Can anyone tell, what am I doing wrong here.

       

      Thanks

      Nirav

        • 1. Re: Dynamic action - condition
          Nicolette

          Nirav

           

          Dynamic actions have 2 different type of conditions.

           

          1)  The condition in the "Condition" section

          This condition determines if the dynamic action is rendered on the page.

          These are only evaluated when the page is rendered. Even more specific only when the page is rendered form the server and not from the cache.

          Uses the session state value of page items

           

          2) The condition in the "When" section.

          This condition determines if the true or false actions need to be executed. These are evaluated every time the event of the dynamic action is fired.

          Uses the client side value of page items.

           

          Looking at the condition type you mentioned you are now using the first one.

          If the P0_STATUS changes depending on the user action in the modal page you. And the dynamic action should run depending on this new value you need to use the second one.

          Meaning the When condition.

           

          Nicolette

          • 2. Re: Dynamic action - condition
            3ds

            Hi Nicolette,

             

            Thanks for your explanation. You put everything in beautifully simple words to understand. But how can I evaluate it in the value section. I mean how can I evaluate P0_STATUS IS NOT NULL.

             

            Cheers

            Nirav

            • 3. Re: Dynamic action - condition
              Nicolette

              Nirav

               

              Try setting the condition to "JavaScipt expression" and the value to apex.item("P0_STATUS").isEmpty().

               

              For an explanation of apex.item( pNd ).isEmpty() see the javascript API.

               

              Nicolette