6 Replies Latest reply on Jan 9, 2019 11:48 PM by Ananda Basak

    Multiple Action sequence under one Dynamic Action is not working

    Ananda Basak

      I am using APEX 5.0 ORDS. I need to create multiple actions in sequence order for True actions under one Dynamic Action in a page. When I am adding the first True action, it is working fine. But as soon as I add the second action under same True action, both stop working.

      More precisely my requirement is that I have a Modal dialog popped up from a parent Modal page when I press a button in the parent page. The child Modal dialog shows some fields and one OK button. When I will press this OK button in the child modal dialog, then there will be two actions.

      1. Close the small child dialog. Used 'Close Dialog' action.

      2. Refresh the parent Modal page. I am using 'Execute Javascript code' for this purpose.

       

      As mentioned above, when I added the first action it was closing the dialog. But when I added the second action , now none of the actions are working. The child dialog is not closing.

       

      I have been searching in internet and this APEX forum for many days and trying so many different options, but failed to achieve intended result. Please help.

        • 1. Re: Multiple Action sequence under one Dynamic Action is not working
          fac586

          Ananda Basak wrote:

           

          I am using APEX 5.0 ORDS. I need to create multiple actions in sequence order for True actions under one Dynamic Action in a page. When I am adding the first True action, it is working fine. But as soon as I add the second action under same True action, both stop working.

          More precisely my requirement is that I have a Modal dialog popped up from a parent Modal page when I press a button in the parent page. The child Modal dialog shows some fields and one OK button. When I will press this OK button in the child modal dialog, then there will be two actions.

          1. Close the small child dialog. Used 'Close Dialog' action.

          2. Refresh the parent Modal page. I am using 'Execute Javascript code' for this purpose.

          Why are you using Execute JavaScript Code rather than Refresh for this? Post the code (as text not a screenshot).

           

          The likelihood is that there is a syntax error in your JavaScript code that is invalidating the dynamic actions. On encountering problems with dynamic content and behaviours, always run the page in debug mode and check the browser console for errors.

          • 2. Re: Multiple Action sequence under one Dynamic Action is not working
            Ananda Basak

            Hello fac586,

            Thanks for responding quickly to help. I tried your suggestions. But so far none worked. I checked Debug report. Nothing suspicious in there.

            Here are two different approaches I tried now.

            On the small child Modal dialog page, I created two actions:

            1. 'Close Dialog'

            2. Refresh. 

            Though I am not sure how this Refresh action will refresh the parent Modal page. The Items, Regions etc choice given to select for Refresh is only from the child Modal dialog and none from the parent page. Anyway, after having these two Actions, none is working. The child dialog is not closing , neither the parent page is Refreshing.

             

            Then I tried other option. I have only one Action for the OK button on child Modal dialog.

            1. 'Close Dialog'

            And I have two Actions on the Parent Modal page button.

            1. 'Execute PLSQL Code'. This was already there and executing perfectly every time. No issue with this Action so far.

            2. 'Refresh' to refresh the intended region in this parent Modal page.

            Now with this setting, the child page is closing fine when I click the OK button there. But parent page region is not refreshing.

             

            Please suggest.

            • 3. Re: Multiple Action sequence under one Dynamic Action is not working
              fac586

              Ananda Basak wrote:

               

              Hello fac586,

              Thanks for responding quickly to help. I tried your suggestions. But so far none worked. I checked Debug report. Nothing suspicious in there.

              Here are two different approaches I tried now.

              On the small child Modal dialog page, I created two actions:

              1. 'Close Dialog'

              2. Refresh.

              Though I am not sure how this Refresh action will refresh the parent Modal page. The Items, Regions etc choice given to select for Refresh is only from the child Modal dialog and none from the parent page. Anyway, after having these two Actions, none is working. The child dialog is not closing , neither the parent page is Refreshing.

               

              Then I tried other option. I have only one Action for the OK button on child Modal dialog.

              1. 'Close Dialog'

              And I have two Actions on the Parent Modal page button.

              1. 'Execute PLSQL Code'. This was already there and executing perfectly every time. No issue with this Action so far.

              2. 'Refresh' to refresh the intended region in this parent Modal page.

              Now with this setting, the child page is closing fine when I click the OK button there. But parent page region is not refreshing.

              Actions defined in the dialog page cannot refresh regions in the parent page.

               

              Install the Sample Dialog packaged application and review the operation of pages 4 and 7:

               

              • Use a Close Dialog process (not a dynamic action) on the modal page to close the dialog.
              • Create a Dialog Closed dynamic action on the parent page with a Refresh action affecting the required region.
              • 4. Re: Multiple Action sequence under one Dynamic Action is not working
                Ananda Basak

                Ok. I followed these steps. Only one confusion there.

                For the Dialog Closed dynamic action on the parent page (with a Refresh action affecting the required region), I have defined the True Action as Refresh and selected the intended Region there,

                But in the DA attributes, there are following three fields. I have selected as follows, Event: Dialog Closed

                Selection Type: Region

                Region: <intended Region>

                 

                The Dialog is closing fine. But the parent page region is not refreshing. Am I selecting wrong Type ? Should this be the button in parent page that opens the dialog? Or the region that I want to refresh?

                • 5. Re: Multiple Action sequence under one Dynamic Action is not working
                  fac586

                  Ananda Basak wrote:

                   

                  Ok. I followed these steps. Only one confusion there.

                  For the Dialog Closed dynamic action on the parent page (with a Refresh action affecting the required region), I have defined the True Action as Refresh and selected the intended Region there,

                  But in the DA attributes, there are following three fields. I have selected as follows, Event: Dialog Closed

                  Selection Type: Region

                  Region: <intended Region>

                   

                  The Dialog is closing fine. But the parent page region is not refreshing. Am I selecting wrong Type ? Should this be the button in parent page that opens the dialog?

                  Yes.

                  Or the region that I want to refresh?

                  No, that's specified in the Affected Elements.

                  • 6. Re: Multiple Action sequence under one Dynamic Action is not working
                    Ananda Basak

                    Thanks. I followed your answers, Chose Button for the Selection Type. But still not refreshing the region.

                     

                    Then in the Help tab for Actions, I found this: (Please note the underlined portion)

                    Refresh

                    Triggers a refresh of the affected elements. Not all elements support a refresh action. You can use this action to refresh content in Interactive Reports, Classic Reports, and all item types with cascading LOV support.

                    The Parent Modal page is neither of the supported varieties. I am thinking that might be the cause of not getting the Modal page refreshed. If you think otherwise please suggest.

                     

                    Therefore I am now changing the strategy, and designing to also close the Parent Modal page along with the dialog close. I changed the Parent page action to 'Dialog Close' (Instead of Refresh) and that is working fine for me. That means the application is going back to the main webpage which is basically a report page.

                     

                    Again, if you think that I did not have to do this compromise and there is way to achieve my original design, please let me know and I will try your suggestions.

                    Thanks a lot for your help so far. After many days of failed efforts, today I have some positive results and happy face.