1 2 Previous Next 22 Replies Latest reply: Sep 9, 2014 7:01 AM by Joe R RSS

    Help with Keeping the page in the same Region after Submit

    Joe R

      Version: 4.1.1.00.23

      Theme: Classic Blue

      Page Template: One Level Tabs

       

      Hello,

       

      I have 6 Classic Reports on the page. Some have Filters with Cascading LOV's and Button's to Submit the Page after the Filters are selected.

      The Page reloads back to the top after Submitting from the Filters.

      I would like to have the page remain on the Region where the submission happened so the User's don't have to scroll back to the Region that they are viewing/working with.

       

      I found this article: http://http://www.apexninjas.com/blog/2011/02/stay-in-page-section-after-submit-on-same-apex-page-unconditional-branch-to-same-page-section/ from Apex Ninjas, but the page still reloads at the top.

       

      I've also tried to put an anchor tag at the bottom of the Page Template in the Body section after all the tags:

      #LOGO#
      #REGION_POSITION_06#
      #REGION_POSITION_07##NAVIGATION_BAR#
      #REGION_POSITION_08#
      #TAB_CELLS#
       
      #SUCCESS_MESSAGE##NOTIFICATION_MESSAGE##GLOBAL_NOTIFICATION#
      #BOX_BODY##REGION_POSITION_02##REGION_POSITION_04#

      #REGION_POSITION_03#
      #REGION_POSITION_01##CUSTOMIZE#

       

      I have a Branch:

      On Submit After Processing

      Target Type of URL

      URL of: f?p=&APP_ID.:124:&SESSION.::::#APPLY_FILTERS_MPL_LT

       

      But the Page still loads at the top and scrolling is needed.

      Can someone help me to get this working?

      What information can I provide?

       

      Thanks,

      Joe

        • 1. Re: Help with Keeping the page in the same Region after Submit
          fac586

          Joe R wrote:

           

          Version: 4.1.1.00.23

          Theme: Classic Blue

          Page Template: One Level Tabs

           

          I have 6 Classic Reports on the page. Some have Filters with Cascading LOV's and Button's to Submit the Page after the Filters are selected.

          The Page reloads back to the top after Submitting from the Filters.

          I would like to have the page remain on the Region where the submission happened so the User's don't have to scroll back to the Region that they are viewing/working with.

           

          I found this article: http://http://www.apexninjas.com/blog/2011/02/stay-in-page-section-after-submit-on-same-apex-page-unconditional-branch-to-same-page-section/ from Apex Ninjas, but the page still reloads at the top.

           

          I've also tried to put an anchor tag at the bottom of the Page Template in the Body section after all the tags:

          #LOGO#
          #REGION_POSITION_06#
          #REGION_POSITION_07# #NAVIGATION_BAR#
          #REGION_POSITION_08#
          #TAB_CELLS#
          #SUCCESS_MESSAGE##NOTIFICATION_MESSAGE##GLOBAL_NOTIFICATION#
          #BOX_BODY##REGION_POSITION_02##REGION_POSITION_04#
          #REGION_POSITION_03#
          #REGION_POSITION_01##CUSTOMIZE#

           

          I have a Branch:

          On Submit After Processing

          Target Type of URL

          URL of: f?p=&APP_ID.:124:&SESSION.::::#APPLY_FILTERS_MPL_LT

           

          But the Page still loads at the top and scrolling is needed.

          Can someone help me to get this working?

          What information can I provide?

          Is the #APPLY_FILTERS_MPL_LT fragment identifier visible in the address bar after page show?

           

          What browser/version are you using? In one project I worked on there were problems with IE 7 & 8 consistently "losing" fragment identifiers when these were included in branch URLs. We ended up implementing a clunky workaround.

           

          Your URL is not including a placeholder for every APEX positional parameter, so the fragment identifier is appearing in the APEX itemNames position. Have you tried adding another 2 colons so it's definitely after all of the APEX arguments?

          • 2. Re: Help with Keeping the page in the same Region after Submit
            898914

            Hello;

             

             

             

            I have turned off subscription but still get email please remove me from subscription now.

             

             

             

            Albert

             

             

            • 3. Re: Help with Keeping the page in the same Region after Submit
              TexasApexDeveloper

              Please do NOT post this in a non-related thread.  Post in the general support forum for the Oracle forums..

               

              Thank you,

               

              Tony Miller
              LuvMuffin Software
              Ruckersville, VA

              • 4. Re: Re: Help with Keeping the page in the same Region after Submit
                Joe R

                Hi Fac586!

                 

                Thanks for replying.

                 

                fac586 wrote:

                 

                Joe R wrote:

                 

                Version: 4.1.1.00.23

                Theme: Classic Blue

                Page Template: One Level Tabs

                 

                I have 6 Classic Reports on the page. Some have Filters with Cascading LOV's and Button's to Submit the Page after the Filters are selected.

                The Page reloads back to the top after Submitting from the Filters.

                I would like to have the page remain on the Region where the submission happened so the User's don't have to scroll back to the Region that they are viewing/working with.

                 

                I found this article: http://http://www.apexninjas.com/blog/2011/02/stay-in-page-section-after-submit-on-same-apex-page-unconditional-branch-to-same-page-section/ from Apex Ninjas, but the page still reloads at the top.

                 

                I've also tried to put an anchor tag at the bottom of the Page Template in the Body section after all the tags:

                #LOGO#
                #REGION_POSITION_06#
                #REGION_POSITION_07# #NAVIGATION_BAR#
                #REGION_POSITION_08#
                #TAB_CELLS#
                #SUCCESS_MESSAGE##NOTIFICATION_MESSAGE##GLOBAL_NOTIFICATION#
                #BOX_BODY##REGION_POSITION_02##REGION_POSITION_04#
                #REGION_POSITION_03#
                #REGION_POSITION_01##CUSTOMIZE#

                 

                I have a Branch:

                On Submit After Processing

                Target Type of URL

                URL of: f?p=&APP_ID.:124:&SESSION.::::#APPLY_FILTERS_MPL_LT

                 

                But the Page still loads at the top and scrolling is needed.

                Can someone help me to get this working?

                What information can I provide?

                Is the #APPLY_FILTERS_MPL_LT fragment identifier visible in the address bar after page show?

                 

                What browser/version are you using? In one project I worked on there were problems with IE 7 & 8 consistently "losing" fragment identifiers when these were included in branch URLs. We ended up implementing a clunky workaround.

                 

                Your URL is not including a placeholder for every APEX positional parameter, so the fragment identifier is appearing in the APEX itemNames position. Have you tried adding another 2 colons so it's definitely after all of the APEX arguments?

                 

                Yes, the #APPLY_FILTERS_MPL_LT fragment shows in the address bar.

                This is in FireFox 31.0

                I'll add the colons to see if that makes a difference.

                 

                I also see that when I pasted the Page Template the code isn't exactly as I pasted it. I used the Raw HTML link. I'll try the SQL link to see if that displays it correctly.  Sorry about that!

                 

                <table summary="" cellpadding="0" cellspacing="0" border="0" width="100%">
                <tr>
                <td valign="top"><a id="t13Logo2" href="#">#LOGO#</a><br />#REGION_POSITION_06#</td>
                <td width="100%" valign="top">#REGION_POSITION_07#</td>
                <td valign="top">#NAVIGATION_BAR#<br />#REGION_POSITION_08#</td>
                </tr>
                </table>
                <div id="t13PageTabs"><table cellpadding="0" cellspacing="0" border="0" summary="" class="t13PageTabs"><tbody><tr>#TAB_CELLS#</tr></tbody></table>
                </div>
                <div id="t13BreadcrumbTop"> </div>
                <table class="t13Layout" cellpadding="0" cellspacing="0" border="0" summary="" width="100%">
                <tr>
                <td class="t13BreadcrumbRegion"><div class="t13Breadcrumbs">#REGION_POSITION_01#<span id="t13Customize">#CUSTOMIZE#</span></div></td>
                </table>
                <a name="SkipRepNav"></a>
                <div id="t13MessageHolder">#SUCCESS_MESSAGE##NOTIFICATION_MESSAGE##GLOBAL_NOTIFICATION#</div>
                <div class="t13BodyMargin">
                <table summary="" cellpadding="0" cellspacing="0" border="0" height="70%">
                <tr>
                <td valign="top" width="100%">#BOX_BODY##REGION_POSITION_02##REGION_POSITION_04#</td>
                <td class="t13ColumnSep"><div class="t13ColumnSep"><br /></div></td>
                <td valign="top"><div style="float:right;">#REGION_POSITION_03#</div></td>
                </tr>
                </table>
                </div>
                <a name="APPLY_FILTERS_MPL_LT"></a>
                
                

                 

                Hopefully this shows up correctly!

                 

                Thanks,

                Joe

                • 5. Re: Help with Keeping the page in the same Region after Submit
                  Joe R

                  Fac586,

                   

                  Update:

                  I changed the URL in the Branch to:

                  f?p=&APP_ID.:124:&SESSION.::::::#APPLY_FILTERS_MPL_LT

                   

                  So I added the two additional colons that I missed and now the URL doesn't NOT show the APPLY_FILTERS_MPL_LT and, of course, the Page still jumps to the top after submission.

                   

                  Thanks,

                  Joe

                  • 6. Re: Help with Keeping the page in the same Region after Submit
                    fac586

                    Seems to be a Firefox problem. Navigating to anchors/element IDs using fragment identifiers specified in branch URLs (with varying numbers of colons) is working for me in Safari 7.0.6, but not in Firefox 31.0. Bugzilla has some bugs that might be relevant.

                    • 7. Re: Re: Help with Keeping the page in the same Region after Submit
                      Joe R

                      Fac586,

                       

                      Yep it looks like that's the issue! I just tried Chrome Version 35.0.1916.153 m and it worked.  AARRGGHH!!


                      Well, any ideas?


                      Thanks,

                      Joe

                      • 8. Re: Help with Keeping the page in the same Region after Submit
                        Tom Petrus

                        Maybe you could use some javascript to help with that? Eg, https://developer.mozilla.org/en-US/docs/Web/API/Element.scrollIntoView to be run on page load?

                        • 9. Re: Help with Keeping the page in the same Region after Submit
                          Joe R

                          Tom,

                           

                          Thank you for the link.

                           

                          I don't know if I'm using this correctly, but I changed the button to 'Defined by Dynamic Action' and put 2 True Actions on the Dynamic Actions.

                          First Actions is to Refresh the Region and the Second is the call to the Javascript function passing the name of the Button.

                          The Javascript seems to be working, but the Region isn't being Refreshed.

                           

                          Do you know if a Dynamic Action Refresh can be used on a Classic Report Region?

                           

                          Thanks,

                          Joe

                          • 10. Re: Help with Keeping the page in the same Region after Submit
                            Tom Petrus

                            Joe,

                             

                            Yes, classic reports are certainly refreshable. Do make sure that in the report attributes the "allow partial refresh" is set to yes, and your region template is not set to "no template" (and if custom, has an id). If you're still unsure then you can check with a browser's developer tools. Eg, in Chrome you can track ajax calls in the network tab (it has to be opened though). In firefox, using firebug, you can see ajax calls in both the console and the network tabs. Check for calls to wwv_flow.show. If you think the region should be refreshed, and you see a call, you may need to investigate some more: forgot any items to be submitted? If there are, do you have SSP enabled? Inspect the call's response: maybe it contains and error page html!

                            • 11. Re: Re: Help with Keeping the page in the same Region after Submit
                              Joe R

                              Tom,

                               

                              There are no error showing up in the Console (Firefox v31.0 and Firebug 2.0.3) or in the Net tab.

                               

                              The Report Region is set to Partial Page Refresh = yes.

                              The Report Region template is set to Reports Region.

                              There is no SSP Enabled on any of the Select Lists.

                              Since I'm doing a Refresh, there's no selection to "...submit any items".

                               

                              What I did notice is that the Select Lists I have in a Region for Filters are not getting into Session. The Session window shows the Select List (5 of them) with their default values, not the values that are selected from the lists.

                               

                              I put an additional True Action on the Dynamic Action to Refresh the Filter Region.

                              So the order now is:

                              Refresh Filter Region

                              Refresh the Report Region

                              Call the Javascript to keep the page on this Region

                               

                              The Dynamic Action is based on a button called APPLY_FILTERS_MPL_LT.

                              Here's a screen shot of the setup page on the Dynamic Action:

                              DynamicActionSetup.png

                               

                              Any other ideas?

                               

                              Thanks,

                              Joe

                              • 12. Re: Help with Keeping the page in the same Region after Submit
                                fac586

                                Joe R wrote:

                                 

                                The Report Region is set to Partial Page Refresh = yes.

                                The Report Region template is set to Reports Region.

                                There is no SSP Enabled on any of the Select Lists.

                                Since I'm doing a Refresh, there's no selection to "...submit any items".

                                 

                                What I did notice is that the Select Lists I have in a Region for Filters are not getting into Session. The Session window shows the Select List (5 of them) with their default values, not the values that are selected from the lists.

                                These items must be specified in the Page Items to Submit attribute in the Source section of the Region Definition.

                                 

                                Since you're now going to be refreshing the reports in situ, is the scrolling actually still required? If the refresh button is close to the start of the report region.

                                I put an additional True Action on the Dynamic Action to Refresh the Filter Region.

                                That won't do anything if the filter region is not a refreshable region type (e.g. a report or chart) and is probably unnecessary (unless the filter values will change in response to events elsewhere).

                                • 13. Re: Help with Keeping the page in the same Region after Submit
                                  Joe R

                                  Hi Fac586,

                                   

                                  Thank you for the help.

                                   

                                  This is getting closer!

                                  I've added the Filter Items to the Page Items to Submit attribute in the Source section of the Region Definition. (Didn't know I needed to do that) and the page does stay at that Region and the Report is Refreshed.

                                   

                                  Now there are two other issues:

                                  There's a button to reset the Filter Items to their Default values and one of the Select Lists is a Cascading List for another Filter Item.

                                   

                                  The Clear Button is set up similarly to the Apply button.

                                  It has 3 True Actions:

                                  First: Execute PL/SQL Code - this is a PL/SQL block to set the Filter Items to their Default values

                                  Second: Refresh the Report Region

                                  Third: Javascript call to keep the page at the Region

                                   

                                  When I click the button the Filter Items are not being re-set to their Default values and the Page jumps to the top.

                                   

                                  The Definition for the Clear button is:

                                  ClearLagTimeFilterDef.png

                                   

                                  The first True Action (Execute PL/SQL Code) is:

                                  ClearLagTimeFilter.png

                                   

                                  Do you see what I missed?

                                   

                                  Thanks,

                                  Joe

                                  • 14. Re: Help with Keeping the page in the same Region after Submit
                                    Tom Petrus

                                    Joe,

                                     

                                    The page jumping to the top implies a page submit or redirect occuring. Can you share your javascript code from the "Execute Javascript" true action with us?

                                    1 2 Previous Next