[Seaside] Select tag no longer allows to custom render option tags? (in bleeding edge seaside 3.0-alpha)

Gerhard Obermann obi068 at gmail.com
Tue Jan 19 10:20:28 UTC 2010


Thanks for reporting.

fixed with Seaside-Canvas-obi.86

Gerhard

On Tue, Jan 19, 2010 at 10:03 AM, Johan Brichau
<johan.brichau at uclouvain.be>wrote:

> Hi,
>
> I just loaded the latest upgrades to Seaside3.0 and noticed a problem with
> the Select tag. The callbacks of 'custom rendered' options using a nested
> #with:, are never executed. This method of customization is suggested in the
> comment of WACollectionTag>>labelForOption:
>
> "Allows to customize the rendering of list items by passing a one argument
> block that converts each option to a string. If you need to do custom html
> rendering for the options use #with: or override #renderOn: in your
> objects."
>
> Since we need to generate specific html for our options and since our
> options are string objects, we preferred using the #with: method rather than
> create a special object and implement a renderOn: method. We have code that
> looks like this:
>
> html select
>        onChange: <javascript that uses the #foobar attribute of selected
> option>;
>        with:
>                [ aCollectionOfOptions
>                                do:     [ :opt |
>                                                (html option)
>                                                        attributeAt: #foobar
> put: opt;
>                                                        callback: [self
> chosenOption: opt];
>                                                        selected: (self
> chosenOption = opt);
>                                                        with: (self
> labelForOption: opt) ] ]
>
>
> However, due to the changes in Seaside-Canvas-obi.76 (as far as I can see),
> the callbacks of the options are never executed.
>
> Is this a bug or is the way to customize the options no longer a supported
> way of working?
>
> thanks for any help
>
>
> ----------------------------
> Johan Brichau
> johan.brichau at uclouvain.be
>
>
>
>
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20100119/9b05f89b/attachment.htm


More information about the seaside mailing list