[Seaside] #updateUrl: and AJAX

Mariano Martinez Peck marianopeck at gmail.com
Fri Dec 19 16:33:30 UTC 2014


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20141219/64b255bc/attachment.htm


More information about the seaside mailing list