Hi,
I'm using Squeak 3.9 and Seaside 2.7.
On my site I have a mainframe including header,
menues and a subframe with content.
The mainframe has WARenderCanvas as
rendererClass.
One of my subframes needs to be updated several
times. Therefore I decided to use the SeasideAsync package and set the
rendererClass to WAAsyncHtmlRenderer.
Two problems appear.
First, the content of the AsyncSubframe is only
shown when its registered as application and shown as a single site without my
mainframe. Embedded in the mainframe it doesn't appear.
Second, everytime the AsyncSubframe ist rerendered,
I want to change the cssStyleSheet. Therefore my asyncDiv looks like
that:
"renderContentOn: html
html divNamed: 'XY' with:[:event: h | self
updateSomething.
h style: self
updatedCssStyleSheet.
self
renderTheNewContentOn: h] every: 5 seconds."
I tested the updatedCssStyleSheet-thing with a
non-async-rendererClass and the contents was shown in the Css-Viewer of the
webframework and the site works fine. But using it async it isn't.
It works but position information isn't recognized
properly.
Inside of updatedCssStyleSheet there are 'position:
absolute'-Css-desciptions and the needed 'position: relative'-Css-desciptions is
declared in an 'XY'-enclosing div-tag but the position information is
ignored. As I said, it works static, but periodic it
doesn't.
Is there any other posibillity to change the style
periodic?
And one more question.
Porting a site from not-async to async is a little
circumstantial. Why is there a different naming for things meaning merely the
same? div id: ; with: and divNamed: with:, for example.
Ah. And one more thing. I couldn't load Seaside
2.8a with SeasideAsync. Will there be any changes in future?
Thanks and Cheers!
Sebastian Heidbrink
_______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
On 10 Apr 2007, at 12:25 , Sebastian Heidbrink wrote:
Hi Sebastian, Since you are using the canvas api for your main frame, you should also use the canvas api for your async components.
Alternatively you can also use WAAsyncComponent as the superclass for your mainframe component.
With the WAAsyncRenderCanvas this would become something like this html div id: 'XY'; refreshWith: [:event :h | ... ] every: 5 seconds.
No, this will not work. The async javascript does not process the <style> elements that you include in a live callback. You should rather play with css class instead and add the corresponding selectors to your main style sheet. html div id: 'XY'; refreshWith: [:event :h | ... h div class: 'periodic'; with: [self renderTheNewContentOn: h] ] every: 5 seconds. As a side note, the async javascript does process the <script> elements that you include in the live callbacks.
If you use WAAsyncRenderCanvas rather than WAAsyncHtmlRenderer things will look consistent.
HTH Michel. _______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Hi Michel, Well, you were 100% right, thanks for your
comprehensive help!
_______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by Michel Bany
Hi Michel again,
Well I had a look and I found a solution to my problem. Including the style information to my main style sheet was none, because the main style sheet is read once on site startup, as you also mentioned. Changing the style sheet link via <script> is also no solution. But I , even so that's not that nice and won't work on Netscape that good, just changed my Block like this: html div id: 'XY'; refreshWith: [:event :h | ... (h div) addStyle: self periodicGeneratedCss; with: [self renderTheNewContentOn: h] ] every: 5 seconds. That works fine, even so I don't know if theres still a better way. Cheers! Sebastian Heidbrink > /No, this will not work. The async javascript does not process the > <style> elements that you include in a live callback./ > /You should rather play with css class instead and add the > corresponding selectors to your main style sheet./ > / > / > / html div / > / id: 'XY';/ > / refreshWith: [:event :h | .../ > / h div class: 'periodic'; with: [self renderTheNewContentOn: > h] ] every: 5 seconds./ > / > / > / > / > /As a side note, the async javascript does process the <script> > elements that you include in the live callbacks./ > / > / >> / / ___________________________________________________________ Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de _______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Free forum by Nabble | Edit this page |