<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Dec 20, 2013 at 5:36 PM, Johan Brichau <span dir="ltr">&lt;<a href="mailto:johan@inceptive.be" target="_blank" class="vt-p">johan@inceptive.be</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Hi Mariano,<br>
<br>
This should do the trick:<br>
<br>
html checkbox<br>
        value: aValue;<br>
        callback: [:boolean |  ... ];<br>
        onClick: (html jQuery ajax serializeThisWithHidden).<br>
<br></blockquote><div><br></div><div>hahah that easy?? Thanks Johan! it seems the key point was the hidden part because I tried many things without that and it didn&#39;t work.</div><div><br></div><div>Now, a last question. In my case, I want to re-render the whole table/containter after the ajax because selected rows have a special color (css class)....I know which is the ID of my tableContainer. I also have access to the component I would like to re-render (self report). I tried a few things like this:</div>
<div><br></div><div><div>renderCellFormContent: anObject on: html</div><div><br></div><div><span class="" style="white-space:pre">        </span>html form: [</div><div><span class="" style="white-space:pre">                </span>html label:[<span class="" style="white-space:pre">        </span></div>
<div><span class="" style="white-space:pre">                        </span>html checkbox</div><div><span class="" style="white-space:pre">                                </span>value: (self isSelected: anObject);</div><div><span class="" style="white-space:pre">                                </span>onClick: (html jQuery ajax </div>
<div><span class="" style="white-space:pre">                                        </span>serializeThisWithHidden;</div><div><span class="" style="white-space:pre">                                        </span>html: [ :renderer | self halt. renderer render: self report ]</div><div><span class="" style="white-space:pre">                                        </span>&quot;onSuccess: ((html jQuery: &#39;#tableContainer&#39;) load)&quot;);</div>
<div><span class="" style="white-space:pre">                                </span>callback: [ :value | self selectRow: anObject value: value ]]]</div><div><span class="" style="white-space:pre">                </span></div></div><div><span class="" style="white-space:pre">But none worked. I am still newbie with Ajax stuff so I am probably doing something wrong.</span></div>
<div><span class="" style="white-space:pre">BTW, if I can only refresh the row, cool, but as far as I know that&#39;s not possible (or complex?). So just rendering the table again I think it would be ok (unless I loose scroll position).</span></div>
<div><span class="" style="white-space:pre"><br></span></div><div><span class="" style="white-space:pre">Any idea? </span></div><div><span class="" style="white-space:pre"><br></span></div><div><span class="" style="white-space:pre"><br>
</span></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
cheers<br>
Johan<br>
<div><div class="h5"><br>
On 20 Dec 2013, at 21:27, Mariano Martinez Peck &lt;<a href="mailto:marianopeck@gmail.com" class="vt-p">marianopeck@gmail.com</a>&gt; wrote:<br>
<br>
&gt; Hi guys,<br>
&gt;<br>
&gt; I have this piece of seaside that renders a checkbox:<br>
&gt;<br>
&gt; renderCellFormContent: anObject on: html<br>
&gt;<br>
&gt;       html form: [<br>
&gt;               html label:[<br>
&gt;                       html checkbox<br>
&gt;                               submitOnClick;<br>
&gt;                               value: (self isSelected: anObject);<br>
&gt;                               callback: [ :value | self selectRow: anObject value: value ]]]<br>
&gt;<br>
&gt; 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....<br>

&gt;<br>
&gt; 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.<br>
&gt;<br>
&gt; Any idea how can I do this in Seaside?<br>
&gt;<br>
&gt; Thanks in advance,<br>
&gt;<br>
&gt; --<br>
&gt; Mariano<br>
&gt; <a href="http://marianopeck.wordpress.com" target="_blank" class="vt-p">http://marianopeck.wordpress.com</a><br>
</div></div>&gt; _______________________________________________<br>
&gt; seaside mailing list<br>
&gt; <a href="mailto:seaside@lists.squeakfoundation.org" class="vt-p">seaside@lists.squeakfoundation.org</a><br>
&gt; <a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_blank" class="vt-p">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br>
<br>
_______________________________________________<br>
seaside mailing list<br>
<a href="mailto:seaside@lists.squeakfoundation.org" class="vt-p">seaside@lists.squeakfoundation.org</a><br>
<a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_blank" class="vt-p">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Mariano<br><a href="http://marianopeck.wordpress.com" target="_blank" class="vt-p">http://marianopeck.wordpress.com</a><br>
</div></div>