[
https://issues.apache.org/jira/browse/TAPESTRY-2209?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Howard M. Lewis Ship closed TAPESTRY-2209.
------------------------------------------
Resolution: Fixed
Fix Version/s: 5.0.11
> JSONObject response contains additional {}
> ------------------------------------------
>
> Key: TAPESTRY-2209
> URL: https://issues.apache.org/jira/browse/TAPESTRY-2209
> Project: Tapestry
> Issue Type: Bug
> Components: Framework
> Affects Versions: 5.0.11
> Environment: java version "1.6.0_01"
> Linux penfold 2.6.22-14-generic #1 SMP Tue Feb 12 07:42:25 UTC 2008 i686
> GNU/Linux
> Tapestr 5.0.11-SNAPSHOT
> Reporter: Adriaan Joubert
> Assignee: Howard M. Lewis Ship
> Fix For: 5.0.11
>
>
> If an event handler returns a JSONObject the response received on the client
> contains an additional pair of brackets.
> An example:
> Object onUpdate() {
> ....
> JSONObject json = new JSONObject();
> json.put("fcId", fcId);
> return json;
> }
> This works fine, but on the client side I get:
> onComplete : function(transport) {
> var response = transport.responseText;
> // if (response.length>2 && response.endsWith("{}"))
> // response = response.substring(0,response.length-2);
> var reply = response.evalJSON(true);
> ....
> }
> The responseText contains
> {"fcId":36178}{}
> Thanks,
> Adriaan
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]