1 Reply Latest reply on Apr 1, 2011 1:17 PM by Coen Damen

    Back button does not refresh the page

    Coen Damen Novice

      Hi,


      I have a page with a shopping cart SFSB. When I add products, the list of products is shown on the page. When I press the back button (both IE and Firefox) one product is subtracted. So the previous page is not rerendered.


      I added the following tags to the meta header.




      <meta http-equiv="cache-control" content="no-cache"/> 
      <meta http-equiv="expires" content="-1"/> 
      <meta http-equiv="pragma" content="no-cache"/> 
      



      The browser does not react to this. I am running a conversation in the page:




      <?xml version="1.0" encoding="UTF-8"?>
      <page xmlns="http://jboss.com/products/seam/pages"
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xsi:schemaLocation="http://jboss.com/products/seam/pages http://jboss.com/products/seam/pages-2.1.xsd"
            view-id="/categories.xhtml">
      
         <begin-conversation join="true" flush-mode="MANUAL"/>
      
      </page>
      



      When I restart the flow, the shopping cart shows the amount of products, so the SFSB is in the correct state. So what do I need to do to make the back button refresh the previous page? I checked some forum entries but was not able to fix this.


      Thanks,
      Coenos

        • 1. Re: Back button does not refresh the page
          Coen Damen Novice

          Ok I got it working using a ..pages.xml entry.



          <header name="Cache-Control" value="no-cache, no-store, max-age=0, must-revalidate" />
          



          This does not help me though, so I started looking for back button implementations. I saw a lot of articles forums on how Seam should be able to handle this. But it does say how to implement this(???). I tried lots of tweaks but I can't get it to work.


          How can I call the back button and see the correct state of the shopping cart, not the previous state? Or do I need to use jbpm?


          Hope anyone can provide me with some info, thanks
          Coen