Hey,<div><br></div><div>I found the solution, I had to put the form inside of the condition in the drawOn method.</div><div>I don&#39;t know why it works like that but my problem is solved :-)</div><div>I know that the code is not the most readable I will have to clean it up with my team.</div>

<div>I&#39;ll ask for advice at that time for sure ;-)</div><div>thx a lot anyway.</div><div><br></div><div>cheers</div><div>alex</div><div><br><div class="gmail_quote">2010/12/3 Robert Sirois <span dir="ltr">&lt;<a href="mailto:watchlala@hotmail.com">watchlala@hotmail.com</a>&gt;</span><br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">



<div>Mm, this is a lot to look at on my cell phone ;)<br><br>Here&#39;s my suggestion for now:<br><br>Simplify what you&#39;re doing by making a little test app or something. Say, ok, I want to display different items, but I want an action associated with them, and I want them in a table as rows.<br>

<br>Write all the rendering methods separate from your data model, so when you&#39;re rendering a list of items, you simply call a render method on it, ie:<br><br>#renderItem: anItem on: html<br><br>So, you would end up with:<br>

<br>items do: [:ea | self renderItem: ea on: html ].<br><br>Yay, so now my items are displayed. My renderItem method has a little checkbox that serializes the object that the row represents to, say, #selectedItems, so now I can do whatever with those.<br>

<br>Hopefully that&#39;s not too oversimplified and helps hehe.<div class="im"><br><br>RS<br><br><hr>From: <a href="mailto:abalonpe@ulb.ac.be" target="_blank">abalonpe@ulb.ac.be</a><br></div>Date: Fri, 3 Dec 2010 19:14:39 +0100<div>

<div></div><div class="h5"><br>Subject: Re: [Seaside] WATableReport Checkbox<br>To: <a href="mailto:seaside@lists.squeakfoundation.org" target="_blank">seaside@lists.squeakfoundation.org</a><br><br>I got the right row when displaying the checkbox but when I click on the checkbox nothing appears in the transcript.<div>

The submitButton fails when I add the following line --&gt; bibliTableListExport drawOn: canvas.</div>

<div><br></div><div>bibliTableList is a list of different tables (Articles, Books, Conferences,...)</div><div>Here is what does drawOn:canvas:</div><div><br></div><div><div>drawOn: canvas</div><div><span style="white-space:pre-wrap">        </span>biblis size = 0</div>



<div><span style="white-space:pre-wrap">                </span>ifFalse: [ </div><div><span style="white-space:pre-wrap">                        </span>self renderBibteXOn: canvas.</div><div><span style="white-space:pre-wrap">                        </span>bibType = &#39;All&#39;</div>



<div><span style="white-space:pre-wrap">                                </span>ifTrue: [ </div><div><span style="white-space:pre-wrap">                                        </span>self</div><div><span style="white-space:pre-wrap">                                                </span>do: [ :eachTable | </div>

<div><span style="white-space:pre-wrap">                                                        </span>eachTable</div><div><span style="white-space:pre-wrap">                                                                </span>removeActionColumn;<span style="white-space:pre-wrap">        </span></div>

</div><blockquote style="border:none;padding:0px"><blockquote style="border:none;padding:0px"><blockquote style="border:none;padding:0px">

<blockquote style="border:none;padding:0px"><blockquote style="border:none;padding:0px"><blockquote style="border:none;padding:0px">

<div>    rows: (biblis select: [ :eachBibli | (eachBibli dico at: &#39;BibteX Type&#39;) data = eachTable       bibType ]);</div></blockquote></blockquote></blockquote></blockquote></blockquote></blockquote><div><div><span style="white-space:pre-wrap">                                                                </span>addActionColumn;</div>



<div><span style="white-space:pre-wrap">                                                                </span>drawOn: canvas ] ]</div><div><span style="white-space:pre-wrap">                                </span>ifFalse: [ </div><div><span style="white-space:pre-wrap">                                        </span>(self select: [ :eachTable | eachTable bibType = bibType ])</div>



<div><span style="white-space:pre-wrap">                                                </span>do: [ :eachSelectedTable | </div><div><span style="white-space:pre-wrap">                                                        </span>eachSelectedTable</div><div><span style="white-space:pre-wrap">                                                                </span>removeActionColumn;</div>



</div><blockquote style="border:none;padding:0px"><blockquote style="border:none;padding:0px"><blockquote style="border:none;padding:0px">

<blockquote style="border:none;padding:0px"><blockquote style="border:none;padding:0px"><blockquote style="border:none;padding:0px">

<div>    rows: (biblis select: [ :eachBibli | (eachBibli dico at: &#39;BibteX Type&#39;) data =    eachSelectedTable bibType ]);</div></blockquote></blockquote></blockquote></blockquote></blockquote></blockquote><div><div>



<span style="white-space:pre-wrap">                                                                </span>addActionColumn;</div><div><span style="white-space:pre-wrap">                                                                </span>drawOn: canvas ] ] ].</div><div><br></div><div>For eachTable the method calls another drawOn:canvas which draw the table depending on its type (Article, Book,...)</div>



<div><br></div><div><div>drawOn: canvas</div><div><span style="white-space:pre-wrap">        </span></div><div><span style="white-space:pre-wrap">        </span>rows size = 0</div><div><span style="white-space:pre-wrap">                </span>ifFalse: [ </div>



<div><span style="white-space:pre-wrap">                </span></div><div><span style="white-space:pre-wrap">                        </span>(canvas div)</div><div><span style="white-space:pre-wrap">                                </span>class: &#39;inTitle&#39;;</div>

<div><span style="white-space:pre-wrap">                                </span>with: [ </div><div><span style="white-space:pre-wrap">                                                        </span>(canvas heading)</div><div><span style="white-space:pre-wrap">                                                                </span>level: 3;</div>

<div><span style="white-space:pre-wrap">                                                                </span>with: self bibType ].</div><div><span style="white-space:pre-wrap">                        </span>(canvas div)</div><div><span style="white-space:pre-wrap">                                </span>class: &#39;bibliTable&#39;;</div>



<div><span style="white-space:pre-wrap">                                </span>with: [ canvas render: super ].</div><div><span style="white-space:pre-wrap">                        </span>(canvas div)</div><div><span style="white-space:pre-wrap">                                </span>class: &#39;controlLink&#39;;</div>



<div><span style="white-space:pre-wrap">                                </span>with: [ </div><div><span style="white-space:pre-wrap">                                                        </span>self renderOptionalAnchorOn: canvas.</div><div><span style="white-space:pre-wrap">                                                        </span>self renderUserAnchorOn: canvas ]] </div>



</div><div><br></div><div>I hope this can clarify the sequence of action.</div><div>Thx very much for your help.</div><div>alex</div><br><div>2010/12/3 Robert Sirois <span dir="ltr">&lt;<a href="mailto:watchlala@hotmail.com" target="_blank">watchlala@hotmail.com</a>&gt;</span><br>



<blockquote style="border-left:1px #ccc solid;padding-left:1ex">



<div>Check out what row is in the callback by exploring or using the Transcript.<br><br>You might be losing pointers to the objects somewhere in there.<div><br><br>RS<br><br><hr>From: <a href="mailto:abalonpe@ulb.ac.be" target="_blank">abalonpe@ulb.ac.be</a><br>



</div>Date: Fri, 3 Dec 2010 18:30:27 +0100<br>Subject: Re: [Seaside] WATableReport Checkbox<div><div></div><div><br>To: <a href="mailto:seaside@lists.squeakfoundation.org" target="_blank">seaside@lists.squeakfoundation.org</a><br>



<br>I have a submitButton also in the form with an empty callback.<div>I just want the button to trigger all the callbacks of the checkboxes.</div><div>However it doesn&#39;t seem to work at all.</div><div><br></div><div>



Alex<br>

<br><div>2010/12/3 Robert Sirois <span dir="ltr">&lt;<a href="mailto:watchlala@hotmail.com" target="_blank">watchlala@hotmail.com</a>&gt;</span><br><blockquote style="border-left:1px #ccc solid;padding-left:1ex">





<div>How are you submitting the data?<br><br>Either they need to be in a form, or if you&#39;re serializing via ajax, remember to use #serializeWithHidden I think it&#39;s called.<br><br>RS<br><br><hr>From: <a href="mailto:abalonpe@ulb.ac.be" target="_blank">abalonpe@ulb.ac.be</a><br>





Date: Fri, 3 Dec 2010 17:02:02 +0100<br>Subject: Fwd: [Seaside] WATableReport + Checkbox<br>To: <a href="mailto:seaside@lists.squeakfoundation.org" target="_blank">seaside@lists.squeakfoundation.org</a><br><br><div>Hi,<div>





<br></div><div>I have a problem with checkboxes. I&#39;m trying to add a checkbox at each line of a table.</div><div>I have tried several things(the last tries are in comments): </div><div>

<br></div><div><div>addActionColumn</div>
<div><span style="white-space:pre-wrap">        </span></div><div><span style="white-space:pre-wrap">        </span>columns</div><div><span style="white-space:pre-wrap">                </span>add:</div>
<div><span style="white-space:pre-wrap">                        </span>((WAReportColumn new)</div><div><span style="white-space:pre-wrap">                                </span>title: &#39;&#39;;</div><div><span style="white-space:pre-wrap">                                </span>valueBlock: [ :row :html | </div>








<div><span style="white-space:pre-wrap">                                                                </span>html span</div><div><span style="white-space:pre-wrap">                                                                        </span>with:[</div></div><blockquote style="border:none;padding:0px">
<blockquote style="border:none;padding:0px"><blockquote style="border:none;padding:0px"><blockquote style="border:none;padding:0px">
<blockquote style="border:none;padding:0px"><blockquote style="border:none;padding:0px"><blockquote style="border:none;padding:0px">
<div><div>  &quot;checked ifTrue:[BibliList bibliCollection add: row].&quot;</div></div></blockquote></blockquote></blockquote></blockquote></blockquote></blockquote></blockquote><div><div><span style="white-space:pre-wrap">                                                                        </span>html checkbox</div>








<div><span style="white-space:pre-wrap">                                                                                </span>value: checked;</div><div><span style="white-space:pre-wrap">                                                                                </span>onTrue:[BibliList bibliCollection add: row]</div><div>
<span style="white-space:pre-wrap">                                                                                </span>onFalse:[].</div><div><span style="white-space:pre-wrap">                                                                                </span>&quot;onClick: [checked := true]&quot;</div><div>                                                                                &quot;callback:[:value | value ifTrue: [BibliList bibliCollection add: row]]&quot;</div>








<div>                                                                                      ]]).</div></div><div><br></div><div>Unfortunately, nothing seems to work...when I click on the checkbox, nothing happen and my list bibliCollection (which is an OrderedCollection) is still empty.</div>








<div>Thx for your help</div><div>alex</div>
</div><br>
<br>_______________________________________________
seaside mailing list
<a href="mailto:seaside@lists.squeakfoundation.org" target="_blank">seaside@lists.squeakfoundation.org</a>
<a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_blank">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a>                                               </div>
<br>_______________________________________________<br>
seaside mailing list<br>
<a href="mailto:seaside@lists.squeakfoundation.org" target="_blank">seaside@lists.squeakfoundation.org</a><br>
<a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_blank">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br>
<br></blockquote></div><br></div>
<br>_______________________________________________
seaside mailing list
<a href="mailto:seaside@lists.squeakfoundation.org" target="_blank">seaside@lists.squeakfoundation.org</a>
<a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_blank">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a>                                               </div></div></div>
<br>_______________________________________________<br>
seaside mailing list<br>
<a href="mailto:seaside@lists.squeakfoundation.org" target="_blank">seaside@lists.squeakfoundation.org</a><br>
<a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_blank">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br>
<br></blockquote></div><br></div>
<br>_______________________________________________
seaside mailing list
<a href="mailto:seaside@lists.squeakfoundation.org" target="_blank">seaside@lists.squeakfoundation.org</a>
<a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_blank">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a>                                               </div></div></div>
<br>_______________________________________________<br>
seaside mailing list<br>
<a href="mailto:seaside@lists.squeakfoundation.org">seaside@lists.squeakfoundation.org</a><br>
<a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_blank">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br>
<br></blockquote></div><br></div>