[Seaside] Using the select tag

David Buck david at simberon.com
Thu Sep 29 11:14:11 UTC 2011


Try this and let me know if it works for you.

        html select
            with: [
                html option
                    value: 'ML';
                    with: 'Male'.
                html option
                    value: 'FML';
                    with: 'Female'].

David Buck


Olivier Auverlot wrote:
> Hi,
>
> I need to use a drop-down menu in a seaside application. In the 
> examples that I have found, the displayed values are initialized with 
> #list:
>
> html  select
>     list:  #(#Male  #Female);
>     selected:  self  contact  gender;
>     callback:  [  :value  |
>         value  =  #Male
>         ifTrue:  [  self  contact  beMale  ]
>         ifFalse:  [  self  contact  beFemale  ]  ].
>
> In the browser, I get this HTML code :
>
> <select  name="3"><option  
> value="1"selected="selected">Male</option><option  
> value="2">Female</option></select>
>
> My problem is how to set the values for each <option> tag ? I would 
> get something like :
>
> <select  name="3"><option  
> value="ML"selected="selected">Male</option><option  
> value="FML">Female</option></select>
>
>
> Thanks for your help.
>
> Best regards
> Olivier ;-)
>
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
>
> -----
> No virus found in this message.
> Checked by AVG - www.avg.com
> Version: 10.0.1410 / Virus Database: 1520/3925 - Release Date: 09/28/11
>
>



More information about the seaside mailing list