You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by nate roe <ph...@gmail.com> on 2008/06/05 22:53:41 UTC

Stateless AutoComplete

I'm using Wicket 1.2, and it appears that when a user's session times out,
my implementation of AbstractAutoCompleteTextRenderer stops working.  I
assume that when the session times out, the server returns errors and the
partial page update fails.

I would like to know if there is a good way to make this behavior stateless,
so that no session is required.  I would also like to know if this changes
in Wicket 1.3.  I know that StatelessForm is introduced.  Would adding this
renderer to a component which is a child of a StatelessForm cause the
renderer to also become stateless?

Thanks,
Nate

Re: Stateless AutoComplete

Posted by nate roe <ph...@gmail.com>.
I accomplished this by writing a servlet to serve the <ul>, then using a
Behavior to add the JavaScript includes for Wicket's scripts to the header,
and to add a call to new Wicket.AutoComplete(...) from onRendered(...).



On Sun, Jun 8, 2008 at 9:09 PM, Eelco Hillenius <ee...@gmail.com>
wrote:

> On Thu, Jun 5, 2008 at 1:53 PM, nate roe <ph...@gmail.com> wrote:
> > I'm using Wicket 1.2, and it appears that when a user's session times
> out,
> > my implementation of AbstractAutoCompleteTextRenderer stops working.  I
> > assume that when the session times out, the server returns errors and the
> > partial page update fails.
>
> Hmmm. I think it was one of the new features of 1.3 that you'll get a
> full page redirect when ajax requests fail so the user would see a
> session expiry message. Sucks if it fails quietly.
>
> > I would like to know if there is a good way to make this behavior
> stateless,
> > so that no session is required.  I would also like to know if this
> changes
> > in Wicket 1.3.  I know that StatelessForm is introduced.  Would adding
> this
> > renderer to a component which is a child of a StatelessForm cause the
> > renderer to also become stateless?
>
> You'd have to develop one from scratch, since ajax behaviors aren't
> stateless in Wicket. Your best bet is to develop it as a (stateless)
> component instead of a behavior if you want this.
>
> Eelco
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: Stateless AutoComplete

Posted by Eelco Hillenius <ee...@gmail.com>.
On Thu, Jun 5, 2008 at 1:53 PM, nate roe <ph...@gmail.com> wrote:
> I'm using Wicket 1.2, and it appears that when a user's session times out,
> my implementation of AbstractAutoCompleteTextRenderer stops working.  I
> assume that when the session times out, the server returns errors and the
> partial page update fails.

Hmmm. I think it was one of the new features of 1.3 that you'll get a
full page redirect when ajax requests fail so the user would see a
session expiry message. Sucks if it fails quietly.

> I would like to know if there is a good way to make this behavior stateless,
> so that no session is required.  I would also like to know if this changes
> in Wicket 1.3.  I know that StatelessForm is introduced.  Would adding this
> renderer to a component which is a child of a StatelessForm cause the
> renderer to also become stateless?

You'd have to develop one from scratch, since ajax behaviors aren't
stateless in Wicket. Your best bet is to develop it as a (stateless)
component instead of a behavior if you want this.

Eelco

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