[Seaside] select tag population / callback..

Boris Popov, DeepCove Labs boris at deepcovelabs.com
Wed Sep 26 12:29:23 UTC 2012

(html select)
    list: self countries;
    selected: country;
    labels: [:ea | ea label];
    callback: [:obj | country := obj].

where #country is an ivar and #countries is a selector returning a collection of your country objects each of which responds to a #label for its textual representation, for example.


-----Original Message-----
From: seaside-bounces at lists.squeakfoundation.org [mailto:seaside-bounces at lists.squeakfoundation.org] On Behalf Of sergio_101
Sent: Wednesday, September 26, 2012 8:12 AM
To: Seaside - general discussion
Subject: Re: [Seaside] select tag population / callback..

> In a form just make the callback something like
> callback:[:value | self setSelectedValue: value]

when i do this, i end up setting the value to the value of the option tag..  what i need to do is point it to the actual object.. i have a feeling i am not wording this correctly..

what i'd like to do is populate the select tag options with some text generated by my objects.

when the form is processed, the value in my component would be set to the object that the select points to..

i hope i am making sense..

photographer, journalist, visionary

seaside mailing list
seaside at lists.squeakfoundation.org

More information about the seaside mailing list