You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by J <bl...@gmx.com> on 2011/01/15 19:16:26 UTC

Skip session creation when AjaxLink is disabled

I have a page that has two states:
-user logged in (session creation allowed)
-no user logged in (no session creation allowed, otherwise bots will crash the server by exploding session creation)

When a logged-in user requests the page, the page should be render with AjaxLinks visible (which will cause sessions to be created).
When a non-logged-in request comes in, the page should render without AjaxLinks visible. How can I achieve this last situation (disabled AjaxLinks) while avoiding sessions?

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Skip session creation when AjaxLink is disabled

Posted by Martin Grigorov <mg...@apache.org>.
Don't create the AjaxLink at all when the user is not authenticated.

Component maybeLink;
if (authenticated) { maybeLink = new AjaxLink()} else {maybeLink = new
WebMarkupContainer()}


On Sun, Jan 16, 2011 at 3:52 PM, Alexander Morozov <
alexander.v.morozov@gmail.com> wrote:

>
> I'm not sure, but you can try Page.setStatelessHint(true)
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Skip-session-creation-when-AjaxLink-is-disabled-tp3219342p3220064.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: Skip session creation when AjaxLink is disabled

Posted by Alexander Morozov <al...@gmail.com>.
I'm not sure, but you can try Page.setStatelessHint(true)



-- 
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Skip-session-creation-when-AjaxLink-is-disabled-tp3219342p3220064.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org