#handleRequest: called twice?

View: New views
4 Messages — Rating Filter:   Alert me  

#handleRequest: called twice?

by Esteban Lorenzano :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,
I'm doing some digging in Seaside code, and recently found that
WAExpiringHandle>>handleRequest: is called twice each request I do...
is that the way it is supposed to work or I'm doing something wrong?

Cheers,
Esteban


_______________________________________________
seaside mailing list
seaside@...
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

Re: #handleRequest: called twice?

by Lukas Renggli :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

>  I'm doing some digging in Seaside code, and recently found that
> WAExpiringHandle>>handleRequest: is called twice each
> request I do... is that the way it is supposed to work or I'm doing
> something wrong?

Normally Seaside gets two requests per interaction.

Are you aware that clicking on a link or submitting a form in Seaside
generates two request by default? The first one to process callbacks,
followed by a redirect and a new request to render the new page.

Cheers,
Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch
_______________________________________________
seaside mailing list
seaside@...
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

Re: #handleRequest: called twice?

by Esteban Lorenzano :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

No, I was not aware of that... there is a way to know what request is
what i'm handle (process callbacks or render page)?

Cheers,
Esteban


On 2008-07-14 14:42:01 -0300, "Lukas Renggli" <renggli@...> said:

>> I'm doing some digging in Seaside code, and recently found that
>> WAExpiringHandle>>handleRequest: is called twice each
>> request I do... is that the way it is supposed to work or I'm doing
>> something wrong?
>
> Normally Seaside gets two requests per interaction.
>
> Are you aware that clicking on a link or submitting a form in Seaside
> generates two request by default? The first one to process callbacks,
> followed by a redirect and a new request to render the new page.
>
> Cheers,
> Lukas



_______________________________________________
seaside mailing list
seaside@...
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

Re: Re: #handleRequest: called twice?

by Lukas Renggli :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> No, I was not aware of that... there is a way to know what request is what
> i'm handle (process callbacks or render page)?

It is questionable if you should really know this? Why do you need to know?

In Seaside 2.9 this will be simpler with the RequestContext.

In Seaside 2.8 and before you could look at the request URL. If there
is a parameter-name with numbers only this is likely to be a
callback-request.

Cheers,
Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch
_______________________________________________
seaside mailing list
seaside@...
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
LightInTheBox - Buy quality products at wholesale price!