What URL you seen in browser after you click back button? Isn't it a
bookmarkable URL? Because that creates new page instance every time.
-Matej
On Sat, Mar 15, 2008 at 11:52 AM, James Carman
<[EMAIL PROTECTED]> wrote:
> On 3/15/08, Matej Knopp <[EMAIL PROTECTED]> wrote:
>
> > The reason why page is not fetched on backbutton is because firefox
> > caches it. You need to send the Cache-control: no-store header to
> > force firefox to reload the page on back button.
> >
>
> Ok, I've change it as follows and it still appears to be working
> incorrectly in FF:
>
>
> public class HomePage extends WebPage
> {
> private static final long serialVersionUID = 1L;
> private static final Logger log = LoggerFactory.getLogger(HomePage.class);
>
> private int counter;
>
>
> public HomePage( final PageParameters parameters )
> {
>
> log.info("I'm (identity " + System.identityHashCode(this) + ")
> being instantiated." );
> final Label label = new Label("message", new LoadableDetachableModel()
>
> {
> protected Object load()
> {
> return "I've been called " + counter + " times.";
> }
> });
> add(label);
>
> add(new Link("refreshLink")
> {
> public void onClick()
> {
> counter++;
>
> log.info("I'm being called on object with identity " +
> System.identityHashCode(HomePage.this));
>
> HomePage.this.modelChanged();
> }
> });
> setStatelessHint(false);
> }
>
> protected void setHeaders( WebResponse webResponse )
> {
> super.setHeaders(webResponse);
> webResponse.setHeader("Cache-control", "no-store, no-cache,
> max-age=0, must-revalidate");
>
> }
>
> public int getCounter()
> {
> return counter;
> }
>
>
> protected Object writeReplace() throws ObjectStreamException
> {
> final Object replacement = super.writeReplace();
> log.info("I'm (identity " + System.identityHashCode(this) + ")
> being write replaced by object " + replacement);
> return replacement;
> }
> }
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
--
Resizable and reorderable grid components.
http://www.inmethod.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]