Sorry, I think I may have it working now.  The trick was the
Cache-Control header (adding in "no-store"), but requiring us to set
Cache-Control headers doesn't sound to me like "Transparent Back
Button Support."  The modelChanged() call did nothing for me (not that
I know for sure that's what I was supposed to be doing yet).  Here's
the version of the page that works 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));
            }
        });
    }

    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]

Reply via email to