[Seaside] #updateUrl: and AJAX

Gastón Dall' Oglio gaston.dalloglio at gmail.com
Mon Dec 22 12:45:48 UTC 2014

Hi Mariano.

Once something similar happened to me, I had to render a component
differences between a do in the full cycle or later with ajax call.
I could understand, is that if you look at the code
WARenderPhaseContinuation>>processRendering: you'll see that along with
rendering the component many other things are done, it is here that the "
self updateURL becomes: actionURL" is performed. My impression was
that all these
tasks are not done when an ajax call is made, but I could not finish
watching understand the code of Seaside at this low level...

If this were so, I would try to copy the code WARenderPhaseContinuation >>
updateURL: and put it within my ajax call handler to force the update url
(ie dirty I know but if it works ...).

(WAVisiblePresenterGuide client: (WAUpdateUrlVisitor url: aURL))
start: self session presenter


2014-12-19 13:33 GMT-03:00 Mariano Martinez Peck <marianopeck at gmail.com>:
> Hi,
> I have an app where I have a root component which is the one being
> displayed almost all time. That component has a menu, a workspace where I
> can have many tabs, etc. Each of my use-case components can implement
> #needsServiceVM answering true or false. Depending on that, I must add a
> special field to the URL because then at web server level I do something
> different.
> Previously, my app was not using AJAX, so for example when I clicked on a
> menu and added a new tab, the #updateUrl: of my root component was called.
> Therefore in that method I could do something like:
> updateUrl: aUrl
> super updateUrl: aUrl.
> self workspaceComponentList anySatisfy: [ :workspace |
> (workspace activeTabPaneRenderable ifNil: [ false ]  ifNotNilDo: [ :tab |
> tab component needsServiceVM])
> ifTrue: [
> aUrl addField: 'service' value: 'true'.
> true ]
> ifFalse: [ false ].
> ]
> The problem is now that the menus are fired by AJAX and the workspace is
> only re-render. Therefore, the clicked use-case component is added  as a
> new tab, but the #updateUrl:  of my root component was not called.
> Is there any workaround I could do? ajaxComplete  and somehow get the URL?
> If it is not by adding a field in the URL do you have another possibility
> in mind? Maybe putting something in the request? (but I must be able to
> read this at the web server).
> Thanks in advance,
> --
> Mariano
> http://marianopeck.wordpress.com
> _______________________________________________
> 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/20141222/ef201465/attachment.htm

More information about the seaside mailing list