If I understood you correctly, I've done something like this to show a 
different page depending on a url parameter. You should override the 
newRequestCycleProcessor() method of your application class, and return a 
different request target from the resolve method. Here I return a 
bookmarkablepagerequesttarget which creates a new home page if a certain 
parameter exists in the request:

    @Override
    protected IRequestCycleProcessor newRequestCycleProcessor() {
        return new WebRequestCycleProcessor() {
            @Override
            public IRequestTarget resolve(RequestCycle cycle, RequestParameters 
params) {
                if (null != 
params.getParameters().get(ContentSearchPage.PARAM_SEARCH_KEY)) {
                    return new 
BookmarkablePageRequestTarget(ContentSearchPage.class);
                }
                return super.resolve(cycle, params);
            }
        };
    }



-----Original Message-----
From: francisco treacy [mailto:[EMAIL PROTECTED]
Sent: Mon 10/6/2008 10:07 PM
To: [email protected]
Subject: force page reload
 
hi,

i'm integrating a wicket application with an online payment system
provided by a bank.

i have a wicket stateful page (ie shows visa / mastercard icons) which
links to the bank app's payment page. depending on the transaction,
the bank sends us back a result code in an encrypted http url
parameter, appended to the url of our wicket page.

        String encrypted =
getWebRequestCycle().getWebRequest().getHttpServletRequest().getParameter("DATA");

according to the bank's response, i decide whether to show a "please
pay" or a "thank you" page with wicket variations.

the only problem i am having here is: the wicket page is cached, so no
matter what the  result is, it will show the last seen version in the
pagemap - that is, it won't re-execute the page's java code.

i tried overriding headers

        protected void setHeaders(WebResponse response) {
                response.setHeader("Pragma", "no-cache");
                response.setDateHeader("Expires",0);
                response.setHeader("Cache-Control", "no-cache, max-age=0,
must-revalidate, no-store");
    }

but none of these http headers are seen in the html output whatsoever.

i also tried implementing IMarkupCacheKeyProvider and returning null.
with no success so far.

what should i do to execute the page's code, no matter when it is called?

thanks,

francisco

---------------------------------------------------------------------
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]

Reply via email to