[Seaside] JQuery load question

Johan Brichau johan at inceptive.be
Mon May 19 13:58:40 UTC 2014


On 19 May 2014, at 15:16, jtuchel at objektfabrik.de wrote:

> One thing I may have overseen is that the question I am raising is probably only relevant if #doSomething in has any influence on what #displayString actually looks like. So as long as displayString is not influenced by #doSomething, Johan's solution is perfect.

But the #displayString is sent after the #doSomething, so that works just fine.

Mind that an ajax callback does not follow Seaside's two-phase requests (i.e. action following by render). An ajax callback is an action callback that updates the current continuation (or session state) 'in place'. You don't need to separate state modifications from rendering code. 

Though, you do have to be a bit careful when you do state modifications over a GET request.... I can tell you stories about security software in proxies and routers that replay every GET request a couple of minutes afterwards. But it's easy to make an ajax request a POST request... and SSL helps too.

Johan


More information about the seaside mailing list