[Seaside] Re: #urlForDocument: w/o canvas?
Sebastian Sastre
ssastre at seaswork.com
Wed Oct 15 14:57:07 UTC 2008
> ofcVariables: html
> ^(Dictionary new)
> at: 'data-file' put: (html context urlForDocument: self data);
> yourself
>
> However I still see a problem: To obtain a URL for the data-file in
> #ofcVariables: I still have to call #urlForDocument. And this is only
> possible to do it by calling the current renderers context and ask it
> for the document URL.
>
Sorry, I don't get something, why this is problem at all?
> > That way could potentially be changed in any calback and
> then render properly
> > according to that.
> Callback rings a bell for me - is there a way to define a
> callback (and
> getting it's URL) and to define what kind of content to return?
>
I think there is, I don't remember right now, but are you sure not thinking too
much resource oriented here?
What problem do you see with callbacks?
> > PD: that, of course, if I understood you right ;)
> You did - I just may have been a bit unclear. It's not that
> it doesn't
> work right know - it's just that changing a sub-components
> state during
> a render-run seems wrong to me.
>
Sure, note callbacks are defined in blocks that are executed in a different
phase than the rendering phase. So the state affected in a callback is not being
made during render. Only defined as eventually executable actions.
I don't see where you are changing components during render. Just a little
refactor to clean up your component.
Cheers,
Sebastian
More information about the seaside
mailing list