[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.

-Boris

-----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..

--
----
peace,
sergio
photographer, journalist, visionary

http://www.ThoseOptimizeGuys.com
http://www.CodingForHire.com
http://www.coffee-black.com
http://www.painlessfrugality.com
http://www.twitter.com/sergio_101
http://www.facebook.com/sergio101
_______________________________________________
seaside mailing list
seaside at lists.squeakfoundation.org
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside


More information about the seaside mailing list