[Seaside] option/selected and s-exprs?

Ragnar Hojland Espinosa seaside@lists.squeakfoundation.org
Tue, 30 Jul 2002 14:35:20 +0200


I want to do something very simple.  I want to display a listbox of
companies, with the company with the id that matches with instance variable
companyID selected.

And its not working.  I'm missing something.. probabily in addHandlers,
right?  And why does value: '[c.companyid]' get ignored?



addHandlers
(template elementName: 'ExMyComponent')
	  onDisplay: [:d | self populate)

populate
"fills the member variable companyID with the magically appropiate value"

companies
"returns an OrderedList of Dictionaries with keys (companyid, companyname)"

html
"fragment of.."
(select (name '@c/companies'
	(option name: 'companyID' value: '[c.companyid]' '[c.companyname]') ))

-- 
Ragnar Hojland - Project Manager
Linalco "Especialistas Linux y en Software Libre"
Tel: +34-91-5970074 Fax: +34-91-5970083