PPR and the Back Button

Hi all,
I posted recently about a workaround Oracle showed me for helping manage back button problems more efficiently, but now I'm having a separate back button problem.
Changes that were made to a page via PPR disappear after coming back to the page by clicking the browser back button--for example, if I added a row to an <af:table> using PPR, navigate off the page, and click the back button, the row will disappear again--although it will reappear as soon as any event re-refreshes the table. I've tried turning off browser chaching, and it makes no difference, which makes me suspect this is not a browser caching issue.
Does anyone know if there's a way to make sure a component is always refreshed when the page is loaded, even if it was loaded via the browser back button?
Thanks much,
Avrom

Hi Frank,
Great idea, thanks! I haven't tried it out in all my cases, but it looks like it's going to work!
For the use of others, here's what you do:
1) Make sure your model layer is capable of supporting the back button here, of course.
2) Create a method, String refresh(), in a backing bean. This method can be a no-op (just return null) if you don't need to do any work to re-set the page. But if, for example, you calculated values referred to in the page, you should re-calculate them here. If you had code that calculated them when the page was originally loaded (*not* for PPR), you can take that out, because this will always get called on a new load/back button load/reload.
3) Add a CommandLink like this one to your page (needs to be in a form, but otherwise it doesn't really matter where):
<af:commandLink id="refresh" partialSubmit="true"
  action="#{yourBean.refresh}"/>4) Add a call to a javascript function like the following in your <afh:body>'s "onload" tag:
function refreshPage() {
    var refreshComp;
    if (document.getElementById)
        refreshComp = document.getElementById("refresh");
    else if (document.all)
        refreshComp = document.all["refresh"];
    else if (document.layers)
        refreshComp = document.layers["refresh"];
    if (refreshComp) {
      refreshComp.click();
}(All of that rigmarole is to support different browsers, which have different ways of retrieving a DOM element by its id.)
5) For each component you need refreshed on a back button, set (or add) "refresh" to its partialTriggers property.
6) Sit back and watch the Back button work.

Similar Messages

  • I open a new webpage in a new tab. I then go to a link and the back button does not allow me to go back to the original webpage. Any suggestions?

    I open a new webpage in a new tab. I then go to a link and the back button does not allow me to go back to the original webpage. Any suggestions?

    I don't think you understood the question. I am having the exact same issue. I open a link in a new tab or window, for example: https://addons.mozilla.org/firefox/addon/backforedrop/
    When the new tab opens, I click on "reviews" to open the link: https://addons.mozilla.org/en-US/firefox/addon/backforedrop/#reviews in the existing tab because I want to see the reviews for this feature. After I read the reviews, I want to go back to the main link, but the back button on my browser is greyed out, as though I was never even on the previous page. So my options are 1) Open every link I ever click on in a new tab or window, or 2) Hope the website is user friendly and attempt to navigate back to the previous page using links inserted on the current page.
    You never realize how frustrating not having back button is until it happens.

  • I updated Firefox on my Mac (10.6.8), and now history is not remembered (that option is checked) and the back button won't work. Help?

    I updated Firefox on my Mac (10.6.8), and now history is not remembered (that option is checked) and the back button won't work. Help?

    A possible cause is a problem with the file places.sqlite that stores the bookmarks and the history.
    *http://kb.mozillazine.org/Bookmarks_history_and_toolbar_buttons_not_working_-_Firefox
    *https://support.mozilla.org/kb/Bookmarks+not+saved#w_fix-the-bookmarks-file
    You can also try to repair the places database with this extension:
    *https://addons.mozilla.org/firefox/addon/places-maintenance/

  • Insert forms and the back button

    Hi,
    I have a page that is transparent to the user and does a
    standard DW insert
    using ASP. It uses <body
    onLoad="document.form1.submit()"> to do this.
    The user clicks on a link, this page does the insert, and
    then they are
    redirected to a results page.
    The problem is if they click on the back button from the
    results page the
    insert happens again and they end up on the results page
    again.
    If they click on the back button I want them to go back to
    the first page
    with the link (and obviously not do the insert).
    How can I do this?
    tia
    -Joe

    Jo,
    How about putting in a <<back link yourself for the
    user to click that takes them to the page you want.
    Paul

  • IE and the back-button

    Hi all...
    I've used JHeadstart 10.1.2 to build a fairly simple UIX based web application. This application is completely a read-only view of some data, layed out as master-detail-detail over a few screens.
    As such, I followed the directions in the JHeadstart Dev Guide to disable back-button protection, since my application didn't need to be protected against misuse of the browser back button.
    Everything works fine in Firefox... users can query the master screen and drilled into details, and use the browser back button to back out of the details to the master page.
    However, IE does not like this at all. It intercepts this back-button use with pages that employ POST form submissions by throwing the following rendering when navigating back up from my app's details pages:
    ================
    Warning: Page has Expired The page you requested was created using information you submitted in a form. This page is no longer available. As a security precaution, Internet Explorer does not automatically resubmit your information for you.
    To resubmit your information and view this Web page, click the Refresh button.
    ================
    What kind of mods in my UIX/Struts JHeadstart code can I make in order for IE to accept use of the back-button in this scenario?
    I realize I can add breadcrumbs to my application, but that doesn't necessarily mean that the users will use this instead of the back button (especially since the users will be public anonymous Internet users -- training is not an issue)?

    Timothy,
    If you google on "how to prevent Warning: Page has Expired" you will find lots of useful links. You nee dto set your caching policy on the http header. You can do this by overriding JhsActionServlet.process, and register your custom action servlet in web.xml.
    You can add calls like this to set caching strategies:
    response.addHeader("Cache-Control", "max-age=3600");
    response.addHeader("Cache-Control", "private");
    Google on "response.setHeader" or reponse.addHeader for more examples.
    Steven Davelaar,
    JHeadstart Team.

  • Firefox Tabs and the Back Button

    I open a page (such as a Google search) in the first tab. I select any entry. When I press the BACK button, the browser (correctly) returns to the Google selection list. If I do the same in any other tab (2 thru nn), the Back button does not return me to the list. Does anyone else experience this? Bug? Feature? I've checked my add-ons, to no avail. This happens in both 3.6 and 4.0, and is not solely related to Google. (And this works OK in IE8.)

    Firefox 4 saves the previous session automatically, so there is no longer need for the dialog asking if you want to save the current session.<br />
    You can use "Firefox > History > Restore Previous Session" to get the previous session at any time.<br />
    There is also a "Restore Previous Session" button on the default <b>about:home</b> Home page.
    Another possibility is to use:
    * [http://kb.mozillazine.org/Menu_differences Firefox (Tools) > Options] > General > Startup: "When Firefox Starts": "Show my windows and tabs from last time"
    Do you still have the Bookmarks Toolbar visible?
    * [[Restore the default Smart Bookmarks Folders]]
    Check that you still have the "Bookmarks Toolbar items" placed on the Bookmarks Toolbar
    If the menu bar is hidden then press F10 or hold down the Alt key, that should make the "Menu Bar" appear
    Make sure that you have the Bookmarks Toolbar and the Navigation Toolbar visible: "View > Toolbars"
    Open the Customize window via "View > Toolbars > Customize" or via "Firefox > Options > Toolbar Layout"
    * Check in "View > Toolbars > Customize" that the "Bookmarks Toolbar items" is on the Bookmarks Toolbar
    * If the "Bookmarks Toolbar items" is not on the Bookmarks Toolbar then drag it back from the Customize window onto the Bookmarks Toolbar
    * If you do not see the "Bookmarks Toolbar items" or other items that are missing in the toolbar palette or on a toolbar then click the "Restore Default Set" button
    See also:
    * http://kb.mozillazine.org/Toolbar_customization

  • This forum and the back button

    I don't know if I'm the only one with this problem. Say I read a thread on Page 3 of the forum. If I then hit the back button on my browser it takes me back to Page 1. How would I be able to get directly back to the list of topics on Page 3 instead? I'm using Windows XP.

    Up to Discussions in Dreamweaver
    its right below your avatar

  • The Back button only allows me to go back one page at a time instead of selecting a previous page from a drop-down list. This is a real problem: anyone have any ideas?

    In the previous version of Firefox, I could go back to a previous webpage by clicking on a part of the Back button which brought up a list of recently visited sites, and by clicking one of these, could jump straight back to that page. This facility does not seem to be available in the latest Firefox, and the Back button only goes back one page at a time. This is really inconvenient, as,
    it now takes longer to get to an earlier page
    there is no visibility of previous pages visited
    any actions carried out on webpages are undone when going back through them - this does not happen when jumping back several pages in one go.
    This is a real problem as I used to the old system constantly, and cannot continue to use Firefox 4.0 unless there is a way around it.

    For me, I have the same question, this is a poorly done upgrade and I want to go back to 3.6

  • When I open a new tab, then go to a new website, the back button doesn't work.

    For instance, I open craigslist in a new tab, then I click on "sporting goods". I try to click back to go back to the original craigslist page and the back button is not lit up and does not work. However if after I am on the sporting goods page (the second page I've looked at in that tab) I click on a set of golf clubs, the back button works to go to the sporting goods page.
    Please help, I have to use explorer in the mean time :(

    I had this problem, but in addition, the refresh button didn't work on the new tab. If you're running McAfee SiteAdvisor, disable it in the addons menu, allow firefox to restart, and see if that solves the problem. It did for me.
    This problem has been reported on McAfee's forum and they say they're working on a fix.

  • My back button and refresh button and my yahoo tool bar are dimmed a lot when I open up firefox. So as a result, I cannot use the back button nor my refresh button AND my yahoo toolbar disappears a lot. I have tried to get on your chat session but it is a

    <blockquote>Locked by Moderator as a duplicate/re-post.
    Please continue the discussion in this thread: [/forum/1/688252]
    Thanks - c</blockquote>
    == Issue
    ==
    I have another kind of problem with Firefox
    == Description
    ==
    My back button and refresh button and my yahoo tool bar are dimmed a lot when I open up firefox. So as a result, I cannot use the back button nor my refresh button AND my yahoo toolbar disappears a lot. I have tried to get on your chat session but it is always closed. I need one on one help. Please reply with resolution.
    == This happened
    ==
    Every time Firefox opened
    == two or three months ago
    ==
    == Firefox version
    ==
    3.6.3
    == Operating system
    ==
    Windows XP
    == User Agent
    ==
    Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.3) Gecko/20100401 (BT-canvas) Firefox/3.6.3 GTB7.0 (.NET CLR 3.5.30729)
    == Plugins installed
    ==
    *-npdnu
    *npdnupdater2
    *Coupons, Inc. Coupon Printer DLL
    *Coupons, Inc. Coupon Printer Plugin
    *The QuickTime Plugin allows you to view a wide variety of multimedia content in Web pages. For more information, visit the QuickTime Web site.
    *6.0.12.448
    *RealPlayer(tm) LiveConnect-Enabled Plug-In
    *RealJukebox Netscape Plugin
    *Default Plug-in
    *Adobe PDF Plug-In For Firefox and Netscape "9.3.2"
    *BrowserPlus -- Improve your browser! -- http://browserplus.yahoo.com/
    *Shockwave Flash 10.0 r45
    *Yahoo Application State Plugin version 1.0.0.7
    *3.0.50106.0
    *My Web Search Plugin Stub for 32-bit Windows
    *Google Updater pluginhttp://pack.google.com/
    *Google Update
    *Next Generation Java Plug-in 1.6.0_20 for Mozilla browsers
    *Npdsplay dll

    * If the menu bar is hidden then press and hold the Alt key down, that should make the Menu bar appear (Firefox 3.6 on Windows) (see [[Menu bar is missing]]).
    * Make sure that you have the ''Navigation Toolbar'' and other toolbars visible: View > Toolbars .
    * If items are missing then see if you can find them in the View > Toolbars > Customize window.
    * If you see the item in the Customize window then drag it back from the Customize window to the Navigation toolbar.
    * If you do not see that item then click the Restore Default Set button in the View > Toolbars > Customize window.
    See also [[Back and forward or other toolbar buttons are missing]] and [[Navigation Toolbar items]]
    See http://kb.mozillazine.org/Toolbar_customization

  • When I click on a result of a Google search and then go that web site, the Back button on the toolbar is grayed out and I cannot return to the search results.

    When using FF3.6 and making a Google search, when I click on a result and then go that web site, the Back button on the toolbar is grayed out and I cannot return to the search results without going to History. This does not happen all the time; about 1/2 of the time.
    This problem is not limited to Google, but occurs with other sites as well.

    If you are talking about searches from - http://www.google.com/ - are you logged into a Google account all the time? If so, check your "Search Settings" from the "gear" in the upper-right corner of that Google search page and see if you have '''Open search results in a new browser window.''' check-marked, at the bottom of that preferences page. When that is check-marked and you have Tab options in Firefox set to '''Open new windows in a new tab instead''', you will get search results always opening in a new tab instead of the same tab. As to why that works different for "sponsored links" I don't know, I haven't seen the "sponsored links" for years now, I have a GM script that blocks those advertisements.

  • When I open a second Firefox browser window, the URL address window, instead of showing the URL, says "Go to a Web Site;" also, and more importantly, the "back" button is greyed out. This is a new problem, and the first Firefox window I open works fine.

    After I open the first Firefox browser window, any additional window I open does not open my homepage, but opens a blank page with "New Tab" showing on the tab. An orange "Firefox" tab with a drop down arrow shows at the upper left hand corner of the screen. All of the options (File, Edit, etc.) are greyed out, however they will work if you move your cursor over them.
    The URL address window says "Go to a Web Site". After I've gone to a website, the back button remains greyed out and I am not able to go back to a previous page. My RoboForm and Netcraft toolbars only show up in an abbreviate form. The add-on bar doesn't show up at all.
    Again, this is a recent problem, and only happens after I've opened one browser window (which works fine) and then open additional browser windows (as few as one additional).

    I had this same problem. Seems to be caused by the web developer tool bar FF extension (this started happening after a recent update to that extension). After disabling it, my FF is back to normal :)

  • I hate the update of the bar. It has totally done away with being able to skip back several places in the browser; now I can only click the back button and go back one page at a time. I otherwise hate the new layout, too. How do I undo this?

    I can't choose a specific page to skip back to but must click the back button over and over to get back to where I want to skip to. The little headings "most visited," "getting started," "Youtube," etc. have changed. They look more colorful, but I hate how the home button is clear over to the right side of the page, etc. What was wrong with the way everything was before? I HATE this new update, and I didn't even want it.

    You can get the drop down list by either right-clicking on the back/forward buttons, or holding down the left button until the list appears.
    If you want the drop-down arrow you can add it with the Back/forward dropmarker add-on - https://addons.mozilla.org/firefox/addon/backforward-dropmarker

  • The back button no longer works. I have disabled all add-ons, rebooted & reset the defaults for the browser and nothing has changed. This happens on all webpages.How do I get the back button to light up again?

    the back button no longer works. I have disabled all add-ons,rebooted & reset the defaults for the browser and nothing has changed. This happens on all webpages.How do I get the back button to light up again?

    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.com/kb/Safe+Mode
    If it does work in Safe-mode then disable all extensions and then try to find which is causing it by enabling one at a time until the problem reappears.
    *Use "Disable all add-ons" on the [[Safe mode]] start window to disable all extensions.
    * Close and restart Firefox after each change via "File > Exit" (Mac: "Firefox > Quit"; Linux: "File > Quit")
    Another possible cause is a problem with the file places.sqlite that stores the bookmarks and the history.
    *http://kb.mozillazine.org/Bookmarks_history_and_toolbar_buttons_not_working_-_Firefox
    *https://support.mozilla.com/kb/Bookmarks+not+saved#w_places-database-file

  • After doing a Google search, I click on a link and go to the searched web page.  When I go back to the Google page using the back button the links I originally clicked on no longer show as "greyed out".  Any idea what is going on with the browser?

    After doing a Google search, I click on a link and go to the searched web page.  When I go back to the Google page using the back button the links I originally clicked on no longer show as "greyed out".  Any idea what is going on with the browser?

    Type '''about:config''' in the Location (address) bar and press the "Enter" key. When you see a warning, click '''I'll be careful, I promise!''' button.
    * Preferences that have been modified are shown as '''bold (user set)'''.
    * Preferences can be '''Reset to the default''' or changed via the right-click context menu.
    -> In the '''Filter bar''', type '''browser.sessionhistory.max_entries'''
    * Right click the preference '''browser.sessionhistory.max_entries''' and click '''Modify'''
    * Change value from 0 to whatever you want over 0 (Default value is 50)
    * click OK
    -> Close the '''about:config''' tab and then Restart Firefox.
    See this post:
    * https://support.mozilla.com/en-US/questions/860894#answer-229574
    Check and tell if its working.

Maybe you are looking for

  • Dates Between Query :( with out TO_DATE.

    Greetings, I have a query whete in the where clause I compare a column b/w two dates. The Query looks like this, trunc(LAST_UPDATE_DATE) BETWEEN '22-FEB-03' AND '21-MAR-03'. This query doesn't fetch any records. Whereas when I use the query with a TO

  • Activate Javascript Function in Report Load

    Hi I have a javascript function that works. I put it in my ReportingServices.js file. If I have a hyperlink on my page and click it, it activates my function and my mouseover events works perfectly. It is a hybrid based on the following: http://blogs

  • Any way to report clear, no-two-ways-about-it BUGS?

    I've been experimenting with Pages, and there's no doubt that it's often cool. Much less clunky than OpenOffice.org. BUT.... I've hit two big, glaring bugs, bugs that by any reasonable test shouldn't have escaped beta, and should have been patched wi

  • Unable to access i tunes store

    i need help. i am unable to use itunes store. when i go to click on the store menu it says connection failed no network connectivity. i have checked my firewall, antivirus settings, turned pop up blocker off. flushed my dns, checked ssl and tsl and r

  • So now that...

    ...i got my computer running again after a failed attempt with the installation discs I still need to downgrade my verson of OS X back to 10.4.6. Are there any methods to downgrading software without a complete restoration (trying to avoid calling ap