[Seaside-dev] Issue 77 in seaside: WAHtmlRoot>>writeHeadOn: broken
when there is no request
codesite-noreply at google.com
codesite-noreply at google.com
Thu Jun 19 16:47:48 UTC 2008
Issue 77: WAHtmlRoot>>writeHeadOn: broken when there is no request
http://code.google.com/p/seaside/issues/detail?id=77
New issue report by philippe.marschall:
The fix to avoid writing extra head elements for Ajax requests assumes
that rendering happens in response to a request, which might not always
be the case, especially if you use seaside rendering facilities for any
kind of report generation and such on the server.
Current,
writeHeadOn: aDocument
aDocument nextPutAll: docType.
aDocument openTag: 'html' attributes: htmlAttrs.
aDocument openTag: 'head' attributes: headAttrs.
WACurrentSession value currentRequest isXmlHttpRequest ifFalse:
[
self
writeElementsOn: aDocument;
writeStylesOn: aDocument;
writeScriptsOn: aDocument ].
aDocument closeTag: 'head'.
aDocument openTag: 'body' attributes: bodyAttrs
Workaround,
writeHeadOn: aDocument
| req |
aDocument nextPutAll: docType.
aDocument openTag: 'html' attributes: htmlAttrs.
aDocument openTag: 'head' attributes: headAttrs.
req := WACurrentSession value currentRequest.
(req isNil or: [req isXmlHttpRequest not])
ifTrue:
[self
writeElementsOn: aDocument;
writeStylesOn: aDocument;
writeScriptsOn: aDocument].
aDocument closeTag: 'head'.
aDocument openTag: 'body' attributes: bodyAttrs
Issue attributes:
Status: Accepted
Owner: philippe.marschall
Labels: Type-Defect Priority-Medium Version-Seaside2.8.1 Version-Seaside2.9
--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
More information about the seaside-dev
mailing list