[Seaside] Problem smalltalk code
Robert Sirois
watchlala at hotmail.com
Wed Oct 27 18:32:11 UTC 2010
Oh cool. Thanks Ramon now I change a bunch of code tonight ;) I always wondered how to do that lol.
Gracias :)
RS via G1
> Date: Wed, 27 Oct 2010 10:49:47 -0700
> From: ramon.leon at allresnet.com
> To: seaside at lists.squeakfoundation.org
> Subject: Re: [Seaside] Problem smalltalk code
>
> Rather than adding to the list like this and passing around strings...
>
> html select
> list: ((user organizations collect: [:org | org oName ]) addFirst:
> '-- Select an organization --'; yourself);
> on: #selected of: self;
>
> Just do this to accomplish the same thing, and you don't really want to
> just get org names either, you want the org object, so fix the labels
> like this...
>
> html select
> beOptional;
> optionLabel: '-- Select an organization --';
> list: user organizations;
> labels: [:org | org oName];
> on: #selected of: self;
>
> Now when the user makes a selects, #selected is set to the correct org
> object, not just its name.
>
> --
> Ramon Leon
> http://onsmalltalk.com
> _______________________________________________
> 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/20101027/da433bb5/attachment.htm
More information about the seaside
mailing list