[Seaside] Fwd: Serializing data in POST request should be
different than GET
Bart Veenstra
bart.veenstra at gmail.com
Sun Aug 15 21:32:57 UTC 2010
Hi Lukas,
I loaded the latest version of seaside into my image and the values are not
passed correctly to the server!
Output: 'bind("move_node.jstree", function(e, data) {
data.rslt.o.each(function(i) {
$.ajax({
"type": "POST",
"data": ["event=move_node.jstree", "performcopy=" +
encodeURIComponent(data.rslt.cy), "id=" +
encodeURIComponent($(this).attr("id")), "metadata=" +
encodeURIComponent(JSON.stringify($(this).data("jstree"))), "ref_id=" +
encodeURIComponent(data.rslt.np.attr("id")), "ref_metadata=" +
encodeURIComponent(JSON.stringify(data.rslt.np.data("jstree"))), "position="
+ encodeURIComponent(data.rslt.cp + i), "title=" + encodeURIComponent(
data.rslt.name), "_s=0XbqEsXeVEcCSt4d", "_k=3IxUCj29hBb9rgbS",
"5"].join("&"),
"url": "/questionmanager"
})
})'
The encoding really does the trick!
Regards,
Bart
2010/8/15 Lukas Renggli <renggli at gmail.com>
> On 15 August 2010 18:56, Bart Veenstra <bart.veenstra at gmail.com> wrote:
> > I am using the packaged seaside version that comes with VW 7.7. Not
> updated
> > to latest, because I ran into issues getting the latest out of the cincom
> > public repository.
> > I do have the latest version loaded into pharo and it uses JSJoin for the
> > data option in JQAjax so the java variabels will still be treated as a
> > String.
>
> The printing of JSJoin changed, not the representation.
>
> > Using a dictionary for the dataparams is a way to fix this, but I
> > understand your concerns with multiple keys of the same value. I haven't
> > figured that one out yet :) maybe using a Dictionary which allows double
> > keys?
>
> This is not the problem. The issue is that methods like serialize
> (http://api.jquery.com/serialize/) return pre-encoded strings that
> need to be "concatenated" with the dictionary.
>
> Lukas
>
> --
> Lukas Renggli
> www.lukas-renggli.ch
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20100815/258755ad/attachment.htm
More information about the seaside
mailing list