SeasideSt / Seaside

The framework for developing sophisticated web applications in Smalltalk.
MIT License
509 stars 71 forks source link

Seaside should support nested param serialization #527

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
This approach has been popularized by PHP, and is also supported by Ruby on 
Rails. For instance, 
{foo: ["bar", "baz"]} is serialized as “foo[]=bar&foo[]=baz”. Many 
Javascript (PrototypeJS, JQuery) 
libraries serialize collections like this.

Original issue reported on code.google.com by renggli on 14 Jan 2010 at 8:10

GoogleCodeExporter commented 9 years ago
Sure, but let's do this as a high-level convenience method on top of actually 
fixing
how GET/POST fields are stored on WARequest... :)

Original comment by jfitz...@gmail.com on 16 Jan 2010 at 7:36

GoogleCodeExporter commented 9 years ago

Original comment by jfitz...@gmail.com on 25 Jan 2010 at 9:37

GoogleCodeExporter commented 9 years ago
Ok, some of the GET/POST stuff is fixed in Issue 405, though I still think it 
needs work.

I also discovered we basically already have/had this behaviour. 
WADictionaryMerge,
which is used by the ServerAdaptors at the moment would combine those so that 
both
'bar' and 'baz' were stored under the key 'foo[]'. I think I'd still rather 
have some
kind of ordered keyed collection class (or FormFields class) that can expose 
the data
that way but still present them as a sequence of ordered pairs.

Original comment by jfitz...@gmail.com on 31 Jan 2010 at 8:51