[Seaside] WASelectTag

Lukas Renggli renggli at gmail.com
Wed Jun 6 08:21:12 UTC 2007


> It looks like WASelectTag is missing the #name: method that all of
> the other form elements have. I can work around it easily enough, but
> then I encounter another problem. This code doesn't generate the
> result I was expecting:
>
>         (html select)
>                 attributeAt: 'name' put: 'PaymentType';
>                 list: #('CREDIT' 'CHECK');
>                 labels: [:each | each asLowercase raiseFirst]
>
> I expected option tags like this:
>
>         <option value='CREDIT'>Credit</option>
>
> But instead, I get:
>
>         <option>Credit</option>
>
> If I try to generate the option tags themselves, I discover that they
> don't understand #value:. I suppose I can employ the same
> attributeAt:put: trick in there, but it feels like I'm working
> against the intended design here.

The design is that you let Seaside figure out the callback names,
values, etc. In your case there is nothing that Seaside can help you.
It cannot know what your external service is expecting.

So yes, you to manually generate the option tags and use #attributeAt:put:

Lukas

-- 
Lukas Renggli
http://www.lukas-renggli.ch


More information about the Seaside mailing list