I agree, having just helped implement an application with a shopping cart in Wicket. The cart is really an attribute of the session rather than of a particular page.
Scott On 8/12/07, Matej Knopp <[EMAIL PROTECTED]> wrote: > Shopping cart is not supposed to be page scoped, so you need to keep > it in session. Also if you want page to be refreshed on back button, > you need to send the Cache-Control: no-store http header. > > -Matej > > On 8/12/07, Artur W. <[EMAIL PROTECTED]> wrote: > > > > >> 1. User opens products page. > > >> 2. User chooses a product. > > >> 3. User clicks "add product to shopping cart". > > >> 4. User is redirected to shopping cart list. > > >> 5. User clicks _back button in the browser_. > > >> 6. Added product in step 3 disappear from the shopping cart :( > > > > >Also note that the user will always be shown the empty shopping cart > > >when pressing the backbutton: the page is in the browser cache. Go to > > >amazon and check yourself. > > > > I don't know how about amazon but in our current implementation of the > > e-shop (spring+jsp) > > when user clicks back button the page is refreshed correctly (the added > > product is in the cart). > > Yes, we set headers :) > > > > In default wicket settings not only the shopping cart is empty but the > > product > > is removed from the cart because of backing previous model state. > > > > So the question is what is the best practice to control which state we want > > to versioning and which not? Could the state be partially versionable? > > > > Thanks, > > Artur > > -- > > View this message in context: > > http://www.nabble.com/shopping-cart-and-back-button-tf4254382.html#a12116192 > > Sent from the Wicket - User mailing list archive at Nabble.com. > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Scott Swank reformed mathematician --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
