[Seaside-dev] Fwd: [Seaside] [BUG] and potential fix

Philippe Marschall philippe.marschall at gmail.com
Wed Sep 19 05:17:42 UTC 2007


Hi

I just wanted to bring this one to everyones attention, it is mainly
targeted at porters. This is a bug in the server adapter so make sure
your server adapter doesn't suffer from it.

Cheers
Philippe
---------- Forwarded message ----------
From: Vagelis Savvas <vagy at freemail.gr>
Date: 19.09.2007 00:46
Subject: [Seaside] [BUG] and potential fix
To: seaside at lists.squeakfoundation.org


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
_______________________________________________
Seaside mailing list
Seaside at lists.squeakfoundation.org
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside


More information about the seaside-dev mailing list