[Seaside] checkbox callbacks

Robert Sirois watchlala at hotmail.com
Sat Sep 24 17:34:49 UTC 2011


Two things:
You're calling #serializeForm, which serializes the nearest form, which would therefore serialize all elements in the form.
Look at JQAjax #serializeThis comment. Checkboxes require a #serializeThisWithHidden call.
RS

> From: laza at blobworks.com
> Date: Sat, 24 Sep 2011 19:31:14 +0200
> To: seaside at lists.squeakfoundation.org
> Subject: [Seaside] checkbox callbacks
> 
> Hi!
> 
> I'm using something like the following in my code:
> 
> renderContentOn: html
> 	| id |
> 	html form: [
> 		id := html nextId.
> 		html checkbox
> 			id: id;
> 			onChange: (html jQuery id: id) load serializeForm;
> 			value: self isChecked;	
> 			callback: [:value | value inspect].
> 		html text: 'Check me'.
> 		id := html nextId.
> 		html checkbox
> 			id: id;
> 			onChange: (html jQuery id: id) load serializeForm;
> 			value: self isChecked2;	
> 			callback: [:value | value inspect].
> 		html text: 'Check me 2'.
> 	]
> 
> I'm surprised to see that both callbacks get triggered even if I only
> check one checkbox. Is this on purpose and expected? According to
> Metacello I'm using Seaside 3.0.6
> 
> Alex
> _______________________________________________
> 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/20110924/f7c045ef/attachment.htm


More information about the seaside mailing list