[Seaside] Checkbox and AJAX?

Johan Brichau johan at inceptive.be
Fri Dec 20 20:36:58 UTC 2013


Hi Mariano,

This should do the trick:

html checkbox 
	value: aValue;
	callback: [:boolean |  ... ];
	onClick: (html jQuery ajax serializeThisWithHidden).

cheers
Johan

On 20 Dec 2013, at 21:27, Mariano Martinez Peck <marianopeck at gmail.com> wrote:

> Hi guys,
> 
> I have this piece of seaside that renders a checkbox:
> 
> renderCellFormContent: anObject on: html
> 
> 	html form: [
> 		html label:[	
> 			html checkbox
> 				submitOnClick;
> 				value: (self isSelected: anObject);
> 				callback: [ :value | self selectRow: anObject value: value ]]]
> 
> That checkbox is actually one table cell of a row of a table (the first column) to select/unselect items. I would like to make this checkbox go with an AJAX request so that the whole page is not rendered and hence I loose scroll position etc....
> 
> So..what I need is that in the onClick of the checkbox I send an AJAX request. The checkbox of course should be updated and I also need to be able to continue executing the callback and the value.
> 
> Any idea how can I do this in Seaside?
> 
> Thanks in advance, 
> 
> -- 
> Mariano
> http://marianopeck.wordpress.com
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside



More information about the seaside mailing list