[Seaside] ajax html callback

Milan Mimica milan.mimica at gmail.com
Wed Apr 27 20:25:51 UTC 2011


I've got a div that I want to re-render using an AJAX callback. The rendering of
this div is isolated in a helper method:

MyWAComopnent >> renderDivOn: html
| id |
	html div id: (id := html nextId); with: [ html render: content ].
	html ... (html jQuery id: id) load html: [ :h | self renderDivOn: h ].

The above does not work as expected because the AJAX actually replaces the 
*contents* of the queried DOM element, leaving you with an additional nested div 
tag on each rendering.

Is there an easy fix to this, other than moving the rendering of the div tag to 
the outer level?

Milan Mimica

More information about the seaside mailing list