[Seaside] requestContext respond: to return custom html

Julian Fitzell jfitzell at gmail.com
Thu Feb 4 04:02:09 UTC 2010


This method is being called from a callback? Can you tell what is
putting the existing content in the response?

I mean, you should be able to reset the response's stream as long as
you are using a BufferedResponse, but I also feel like the renderloop
shouldn't be generating that content during callback processing...

Julian

On Wed, Feb 3, 2010 at 7:09 PM, Nick Ager <nick.ager at gmail.com> wrote:
> Hi,
> I'm implementing a multifile uploader form, using a hidden iframe and
> directing the forms 'target' property to the iframe. It's almost working
> apart from I want the response from the each form submission to be some
> status I can report back to the user. I'm trying to ensure the iframe only
> contains a simple response as follows:
> renderIFrameContent
> self requestContext respond:
> [ :response |
> response
> contentType: WAMimeType textHtml;
> nextPutAll: (WAHtmlCanvas builder
> documentClass: WATagDocument;
> fullDocument: true;
> render: [:html |
> html div
> id: #uploadResults;........
>
> however it seems that when my code executes the response buffer already
> contains the header html so at best the output ends up as:
> <html><head><title></title><base
> target="_top"/></head><body><html><head><title></title></head><body><div
> id="imageUploadResults">.....
> that is my code adds to the existing response stream which already contains:
> <html><head><title></title><base target="_top"/></head><body>
> Is there a way to clear the response buffer/force a new response or is there
> a better approach?
> Thanks
> Nick
>
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
>


More information about the seaside mailing list