[Seaside] Differences in calling render: from ajax?

Tim Mackinnon tamackinnon at gmail.com
Wed Aug 11 23:17:29 UTC 2010

So I was making great progress until I descided to render remove 
buttons with items in my subcomponent.

When I initially render my component I have something like this:

renderContentOn: html
	(html div)
	     self contentModel tokenWaitersDo: [ :item | html tableRow: [ 
		i := i + 1.
		   tableData: [ html text: item name ];
		   tableData: [html button 												onClick: (html jQuery ajax 
script: [:s| self removeToken: i]); 						value: 'Remove' ] ] ] ] ] ]

And I get something in my page like this:

<button class="submit" type="submit" 


I click on my remove button - I end up doing something like:

ajaxReplaceWith: aJSQuery
	^ (aJSQuery id: myId) replaceWith: [ :r | r render: self ]

But it generates the following:

<button class="submit" type="submit" 


think I picked up the above fragment from some mal message answer by 
Lukas - and it was working well, but notice how the url parameter is 
wrong - its not /element with the k and s paramters???

Is this because render: is not rendering in the context of a child 
component? And is there some other way of re-rendering my component by 
an ajax call? I think Julian had an example in the comet thread - maybe 
I can get that to work?

Any help greatly appreciated.


More information about the seaside mailing list