[Seaside] Seaside + Scriptaculous: updating multiple elements

lperez at lifia.info.unlp.edu.ar lperez at lifia.info.unlp.edu.ar
Wed Jun 6 19:10:40 UTC 2007


Hello everyone,
I'm learning both seaside and scriptaculous and I'm new at this  
mailing list. I'm not sure if this is the right place to post this  
question so, in advance, please forgive if it isn't the place

basically what i want to achieve is this:

Different elements of a rendered html must be updated when a  
particular action is performed, e.g.
MyComponent>> renderContentOn: html
		html div id:'element_one'; with:'element one content'.
		html div id:'element_two'; with:'element two content'.
		html form id:'form'; with:[
			(html submitButton)
				text: 'some action';
				callback: ["perform some action"] ]

when clicking the submit button some action is performed and different  
elements (in this case two divs), not just one, must be updated  
according to the action effects.

When only one element is meant to be updated, a SUUpdater can be used  
and something like this can be done:

MyComponent>> renderContentOn: html
		html div id:'element_one'; with:'element one content'.
		html form id:'form'; with:[
			(html submitButton)
				text: 'some action';
				onClick: ((html updater)
					id: 'element_one';									triggerForm: 'form';									callback:  
[:r | 										"perform some action"									r render: 'action  
results..'];							return: false);											]

but when multiple elements are meant to be refreshed or updated i  
don´t know what to do..

anybody knows which is the best way to solve this?


i'm currently using
	VisualWorks NonCommercial, 7.5
	Seaside2.7b1
	Scriptaculous2.6-mb.8

thanks a lot!!
Leandro


----------------------------------------------------------------
Este mensaje ha sido enviado utilizando IMP desde LIFIA.



More information about the Seaside mailing list