[Seaside] #answer from within a jQuery

Julian Fitzell jfitzell at gmail.com
Fri Apr 30 21:05:26 UTC 2010

The IllegalStateException (could be a clearer name) is raised if you try to
set an HTTP header after the headers have already been written to the
socket. So most likely you're using a streaming server and have already
started writing to the document body.

I can't visualize exactly which header that would be without stepping
through it or seeing the stack, but I seem to recall we determined that
calling inside an ajax request didn't make sense (could be true for
answering to something that was called--as opposed to shown--as well?).

Hopefully that gives you a nudge in the right direction. If not, I'd have to
dig in further but maybe Lukas knows more off the top of his head.


On Fri, Apr 30, 2010 at 5:43 PM, John Toohey <jt at parspro.com> wrote:

> I have a login dialog (jQuery Dialog) is a component that is called
> from my root task. Its Login button has an onClick handler like this
> :-
> onClick: (html jQuery ajax  script: [ :s | self validateLogin:  s])
> During the #validateLogin, the id/password etc are checked, and if
> there is a problem, then the script is filled with jQuery calls to
> highlight fields and display a message. This works as expected,
> however, if all the tests pass, then the #validateLogin replies with
> an #answer call. This sends control to my root task, which then
> #call's the main page component.
> At this point, Seaside throws an IllegalStateException from #isCommitted.
> If I use a regular callback, then the #answer/#call works, but in that
> case I don't have a script to send back to the browser, in error
> situations.
> Is the problem because the Ajax handler is terminated by the #answer call?
> --
> -JT
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20100430/98e89ef4/attachment.htm

More information about the seaside mailing list