Opened 14 years ago
Closed 14 years ago
#2255 closed defect (fixed)
dojo.io.bind does not do recursive serialization
Reported by: | guest | Owned by: | alex |
---|---|---|---|
Priority: | high | Milestone: | 0.9beta |
Component: | IO | Version: | 0.4.1 |
Keywords: | io bind | Cc: | [email protected]… |
Blocked By: | Blocking: |
Description
When calling dojo.io.bind with a nested array, such as:
content: { param0: document.getElementById('something').value, param1: { qualifier: 'x', other: 'y' }, param2: { option_a: 1, option_b: 2 } }
it behaves by passing the nested "objects" directly without attempting to serialize them first. This makes it impossible to call a function using XmlHttpRequest? which uses hashes for any of its parameters (like one coded in PHP or Python).
Attachments (2)
Change History (6)
comment:1 Changed 14 years ago by
Changed 14 years ago by
Attachment: | dojo.2255.patch added |
---|
Patch to fix this issue against 0.4.1-ajax build
Changed 14 years ago by
Attachment: | dojo.2255.src.patch added |
---|
Patch in source tree (src/io/common.js) to resolve issue properly, I think.
comment:2 Changed 14 years ago by
Milestone: | → 0.9M1 |
---|---|
Status: | new → assigned |
since JSON will be in 0.9 base, I'm accepting this for 0.9 but not 0.4.2
comment:3 Changed 14 years ago by
Milestone: | 0.9M1 → 0.9beta |
---|
comment:4 Changed 14 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
dojo.toJson and dojo.fromJson are available in Base now as is dojo.formToJson. Use these methods to recursively serialize a form for use w/ the dojo.xhr* methods.
Marking fixed.
This is definitely *not* a complete and full solution, but ...
Including
dojo.json
in the build and then making the following change will allow it to be serialized todojo.io.argsFromMap
: