[Seaside] [BUG] and potential fix

Vagelis Savvas vagy at freemail.gr
Tue Sep 18 22:46:07 UTC 2007


Hi, this is my first message to the list. I'm Vagelis Savvas and i'm
evaluating Seaside 2.8 as fetched from SqueakSource repository
(Seaside2.8a1-lr.484) on Squeak 3.8

The bug i'm talking about shows up when you have a multiselect
form element (WAMultiSelectTag) on a multipart form. Regardless of
how many list entries someone selects, after posting the form, the
callback block parameter refers to one only of the selected list entries.
To see the bug in action just accept the following code in a component:

renderContentOn: html
html form multipart; with:[
	html multiSelect list: (OrderedCollection with: 'first' with: 'second'  
with: 'third');
		callback: [ :value | self halt ].
	html button text:'post'].

select more than one list entries, post and observe value on halt.

The potential fix (i call it potential coz i'm not sure if its right)
lies in WAKom>>processMultipartFields: The last line of this method reads  
like

aRequest postFields at: chunk fieldName put: contents

and with the fix it reads like:

(aRequest postFields at: chunk fieldName ifPresent: [ :c | c add:  
contents]) ifNil:[
	aRequest postFields at: chunk fieldName put: (OrderedCollection with:  
contents)]]


If the fix is wrong what else can be done about it?

Greetings,
vagy


More information about the seaside mailing list