Hello folks, could you guys give some examples on how to create/use checkboxes with Seaside 2.7, please?
And one more thing: why doesn't the 'id' attribute work sometimes? For example, I've tried using: html table id:'myTable'; with [ ....etc... ] And what I get is that a text 'myTable' shows up at my page and no 'id' attribute is used in my table. And it happens not only with tables but other elements like forms too. Thanks for your support! Regards, Kazuki Sanada _______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Try the code from http://www.lukas-renggli.ch/smalltalk/seaside/artofseaside.txt
and you can download the code directly from http://www.lukas-renggli.ch/smalltalk/seaside (Art of Seaside Presentation) On 7/3/07, Kazuki Yatsuga <[hidden email]> wrote: Hello folks, could you guys give some examples on how to create/use checkboxes with Seaside 2.7, please? -- Rajeev Lochan Co-founder, AR-CAD.com http://www.ar-cad.com +91 9212090622 (Gurgaon) 080 65355873 (Bangalore) _______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by Kazuki Yatsuga
2007/7/3, Kazuki Yatsuga <[hidden email]>:
> Hello folks, could you guys give some examples on how to create/use > checkboxes with Seaside 2.7, please? > And one more thing: why doesn't the 'id' attribute work sometimes? For > example, I've tried using: > > html table id:'myTable'; with [ ....etc... ] > > And what I get is that a text 'myTable' shows up at my page and no 'id' > attribute is used in my table. And it happens not only with tables but other > elements like forms too. Thanks for your support! Works for me. Could you please give minimal code that exposes the problem as ST, CS or MCZ? Are you sure you didn't mess your table (forgot tableRow or tableData)? And about the checkboxes: don't forget the form. Cheers Philippe > Regards, > Kazuki Sanada > > > > _______________________________________________ > Seaside mailing list > [hidden email] > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Thanks for the tips! They're really helpful!
I think I found out why the 'id' attribute didn't work. I think it was because I was using WAHtmlRender as my RendererClass. Am I right? Now that I noticed that I was using WAHtmlRenderer, I managed to create checkboxes using this: checkboxWithValue:callback: I also noticed that in this class, there is a method checkboxWithValue:callback:usingFormNamed: , or something like that. How am I supposed to use that? It seems that you have to pass a form name, but how can I do that? Can I associate a checkbox with a different form? (by different, I mean not the one enclosing the checkbox). Thanks again for the support! Regards, Kazuki On 7/3/07, Philippe Marschall <[hidden email]> wrote:
2007/7/3, Kazuki Yatsuga <[hidden email]>: _______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
2007/7/3, Kazuki Sanada <[hidden email]>:
> Thanks for the tips! They're really helpful! > > I think I found out why the 'id' attribute didn't work. I think it was > because I was using WAHtmlRender as my RendererClass. Am I right? Yepp, WAHtmlRender is deprecated and will be removed in future versions. > Now that I noticed that I was using WAHtmlRenderer, I managed to create > checkboxes using this: > > checkboxWithValue:callback: > > I also noticed that in this class, there is a method > checkboxWithValue:callback:usingFormNamed: , or something > like that. How am I supposed to use that? It seems that you have to pass a > form name, but how can I do that? html cssId: 'WAHtmlRenderIsUncool'. html form: [ html checkboxWithValue: self checked callback: [ :value | self checked: value ] usingFormNamed: 'WAHtmlRenderIsUncool' ] Clicking on the checkbox will then submit the form. > Can I associate a checkbox with a > different form? (by different, I mean not the one enclosing the checkbox). I guess so, but then the checkbox callback will not be evaluated. Cheers Philippe > Thanks again for the support! > > Regards, > Kazuki > > On 7/3/07, Philippe Marschall <[hidden email]> wrote: > > 2007/7/3, Kazuki Yatsuga <[hidden email]>: > > > Hello folks, could you guys give some examples on how to create/use > > > checkboxes with Seaside 2.7, please? > > > And one more thing: why doesn't the 'id' attribute work sometimes? For > > > example, I've tried using: > > > > > > html table id:'myTable'; with [ ....etc... ] > > > > > > And what I get is that a text 'myTable' shows up at my page and no 'id' > > > attribute is used in my table. And it happens not only with tables but > other > > > elements like forms too. Thanks for your support! > > > > Works for me. Could you please give minimal code that exposes the > > problem as ST, CS or MCZ? Are you sure you didn't mess your table > > (forgot tableRow or tableData)? > > > > And about the checkboxes: don't forget the form. > > > > Cheers > > Philippe > > > > _________________________________ > > Seaside mailing list > > [hidden email] > > > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > > > > _______________________________________________ > Seaside mailing list > [hidden email] > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Well, what I'm trying to do is creating a table and put some checkboxes inside this table which set some properties. And I want to have a submit button. The difficulty I'm facing is that since the checkboxes require an enclosing form, I'm unable to put this submit button outside the table. I've tried putting the table inside the form, but that didn't work...the submit button shows up inside the table... :)
How can I do this? On 7/5/07, Philippe Marschall <[hidden email]> wrote:
2007/7/3, Kazuki Sanada <[hidden email]>: _______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
2007/7/5, Kazuki Sanada <[hidden email]>:
> Well, what I'm trying to do is creating a table and put some checkboxes > inside this table which set some properties. And I want to have a submit > button. The difficulty I'm facing is that since the checkboxes require an > enclosing form, I'm unable to put this submit button outside the table. I've > tried putting the table inside the form, but that didn't work...the submit > button shows up inside the table... :) > How can I do this? A form around the table is the way to go, your approach sounds right. Sketched the code should look like this: html form: [ html table: [ ... ]. html sumbitButtonXXX ] Philippe > On 7/5/07, Philippe Marschall <[hidden email]> wrote: > > > > 2007/7/3, Kazuki Sanada <[hidden email]>: > > > Thanks for the tips! They're really helpful! > > > > > > I think I found out why the 'id' attribute didn't work. I think it was > > > because I was using WAHtmlRender as my RendererClass. Am I right? > > > > Yepp, WAHtmlRender is deprecated and will be removed in future versions. > > > > > Now that I noticed that I was using WAHtmlRenderer, I managed to create > > > checkboxes using this: > > > > > > checkboxWithValue:callback: > > > > > > I also noticed that in this class, there is a method > > > checkboxWithValue:callback:usingFormNamed: , or > something > > > like that. How am I supposed to use that? It seems that you have to pass > a > > > form name, but how can I do that? > > > > html cssId: 'WAHtmlRenderIsUncool'. > > html form: [ > > html > > checkboxWithValue: self checked > > callback: [ :value | self checked: value ] > > usingFormNamed: 'WAHtmlRenderIsUncool' ] > > > > Clicking on the checkbox will then submit the form. > > > > > Can I associate a checkbox with a > > > different form? (by different, I mean not the one enclosing the > checkbox). > > > > I guess so, but then the checkbox callback will not be evaluated. > > > > Cheers > > Philippe > > > > _______________________________________________ > > Seaside mailing list > > [hidden email] > > > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > > > > _______________________________________________ > Seaside mailing list > [hidden email] > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Yep. This approach doesn't work with WAHtmlRenderer, but works beautifully with WARenderCanvas. Thanks a lot Philippe!
On 7/5/07, Philippe Marschall
<[hidden email]> wrote:
_______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Free forum by Nabble | Edit this page |