On Fri, May 24, 2013 at 3:22 PM, Dirk Forchel <dirk.forc...@exedio.com>wrote:

> I reckon WICKET-5083 is a bugfix for wrong rendered URLs (stateful pages
> were
> rendered without a page version number) which in our case was correct but
> just as a mistake. It seems, that our pages are stateful and therefore get
> the page version number (page id ?x) attached. As I described above, in our
> project this results in an error (endless loop) if cookies are not allowed
> or if a web crawler wants to index the site, because we don't support
> session IDs in URLs.
> The only solution I can think of, is to mark these pages as "stateless".
> What is the correct way to do this? A "stateless" page must be at least
> bookmarkable and no child component should be stateful.
> I can remember that the annotation @StatelessComponent in combination with
> the StatelessChecker and the method call setStatelessHint(true) was
> necessary to mark a page as being "stateless".
> Is this still necessary? Or what is the preferred way for doing this?
>

page.setStatelessHint(false) should be enough to simulate that it is
stateless.
But check the urls of the links inside the page markup. If there is no ?X
then a new page instance will be created to execute the callback method
(e.g. onClick()).
Since you believed in 6.7.0 that the page is stateless I assume you do not
keep any state, so all should be still OK.


>
> As a quick hack I've already changed our render strategy from
> REDIRECT_TO_BUFFER to REDIRECT_TO_RENDER. In that case no page version id
> is
> attached at all. What could be the flaw for using this render strategy as
> an
> alternative?
>

Check the its javadoc in IRequestCycleSettings


>
> Thanks for your helping hand.
>
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/REDIRECT-TO-BUFFER-render-strategy-and-Wicket-6-8-0-tp4658991p4659021.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

Reply via email to