[Seaside] Using the select tag
olivier.auverlot at gmail.com
Thu Sep 29 12:23:29 UTC 2011
It's possible that I want work with a too old method for Seaside. I made
many cgi in my programmer life ;-)
For me, when I use a select tag, I don't use the value and the caption
to do the same operation. The caption is displayed for the user, the
value is transmitted to the server. It's very distinct to me.
In my case, I have a database table with a foreign key (the value) and a
description (the caption). The key is immutable but the text can change.
It's logical for me that the user selects a caption and that the serveur
receives the key.
> 2011/9/29 Olivier Auverlot<olivier.auverlot at gmail.com>:
>> 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
>> My problem is how to set the values for each<option> tag ? I would get
>> something like :
> Why do you want to do this?
> seaside mailing list
> seaside at lists.squeakfoundation.org
More information about the seaside