[Seaside] Select tag no longer allows to custom render option tags? (in bleeding edge seaside 3.0-alpha)

Johan Brichau johan.brichau at uclouvain.be
Tue Jan 19 09:03:38 UTC 2010


I just loaded the latest upgrades to Seaside3.0 and noticed a problem with the Select tag. The callbacks of 'custom rendered' options using a nested #with:, are never executed. This method of customization is suggested in the comment of WACollectionTag>>labelForOption:

"Allows to customize the rendering of list items by passing a one argument block that converts each option to a string. If you need to do custom html rendering for the options use #with: or override #renderOn: in your objects."

Since we need to generate specific html for our options and since our options are string objects, we preferred using the #with: method rather than create a special object and implement a renderOn: method. We have code that looks like this:

html select
	onChange: <javascript that uses the #foobar attribute of selected option>;
		[ aCollectionOfOptions 
				do:	[ :opt | 
						(html option)
							attributeAt: #foobar put: opt;
							callback: [self chosenOption: opt];
							selected: (self chosenOption = opt);
							with: (self labelForOption: opt) ] ] 

However, due to the changes in Seaside-Canvas-obi.76 (as far as I can see), the callbacks of the options are never executed. 

Is this a bug or is the way to customize the options no longer a supported way of working?

thanks for any help

Johan Brichau
johan.brichau at uclouvain.be

More information about the seaside mailing list