[Seaside] How to create checkboxes

Philippe Marschall philippe.marschall at gmail.com
Thu Jul 5 18:09:46 UTC 2007


2007/7/3, Kazuki Sanada <hartzzenen at gmail.com>:
> 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 <philippe.marschall at gmail.com> wrote:
> > 2007/7/3, Kazuki Yatsuga <hartzzenen at gmail.com>:
> > > 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
> > Seaside at lists.squeakfoundation.org
> >
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
> >
>
>
> _______________________________________________
> Seaside mailing list
> Seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
>


More information about the Seaside mailing list