You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Jesse Kuhnert (JIRA)" <de...@tapestry.apache.org> on 2007/05/25 22:54:16 UTC

[jira] Created: (TAPESTRY-1517) form submitAsync doesn't set a JSON load handler

form submitAsync doesn't set a JSON load handler
------------------------------------------------

                 Key: TAPESTRY-1517
                 URL: https://issues.apache.org/jira/browse/TAPESTRY-1517
             Project: Tapestry
          Issue Type: Bug
          Components: JavaScript
    Affects Versions: 4.1.2
         Environment: client side browser
            Reporter: Jesse Kuhnert
            Priority: Critical
             Fix For: 4.1.2


tapestry.form.submitAsync is missing a critical piece for JSON responses:

I studied the problem how to set callback function on the JSON response and
I found that when JSON response is received no callback function is called.
It happens only if json="true". This happens in the file form.js in
submitAsync:function(form, content, submitName, parms) function. I think it
should look like that:

if (this.forms[formId].json || parms && parms.json) {
       kwArgs.headers={"json":true};
       kwArgs.mimetype="text/json";
--->   kwArgs.load=(function(){tapestry.loadJson.apply (this, arguments);});
} else {
       kwArgs.headers={"dojo-ajax-request":true};
       kwArgs.mimetype="text/xml";
       kwArgs.load=(function(){tapestry.load.apply(this, arguments);});
}

Is it bug?

-- 
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: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


[jira] Resolved: (TAPESTRY-1517) form submitAsync doesn't set a JSON load handler

Posted by "Jesse Kuhnert (JIRA)" <de...@tapestry.apache.org>.
     [ https://issues.apache.org/jira/browse/TAPESTRY-1517?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jesse Kuhnert resolved TAPESTRY-1517.
-------------------------------------

    Resolution: Fixed
      Assignee: Jesse Kuhnert

> form submitAsync doesn't set a JSON load handler
> ------------------------------------------------
>
>                 Key: TAPESTRY-1517
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-1517
>             Project: Tapestry
>          Issue Type: Bug
>          Components: JavaScript
>    Affects Versions: 4.1.2
>         Environment: client side browser
>            Reporter: Jesse Kuhnert
>         Assigned To: Jesse Kuhnert
>            Priority: Critical
>             Fix For: 4.1.2
>
>
> tapestry.form.submitAsync is missing a critical piece for JSON responses:
> I studied the problem how to set callback function on the JSON response and
> I found that when JSON response is received no callback function is called.
> It happens only if json="true". This happens in the file form.js in
> submitAsync:function(form, content, submitName, parms) function. I think it
> should look like that:
> if (this.forms[formId].json || parms && parms.json) {
>        kwArgs.headers={"json":true};
>        kwArgs.mimetype="text/json";
> --->   kwArgs.load=(function(){tapestry.loadJson.apply (this, arguments);});
> } else {
>        kwArgs.headers={"dojo-ajax-request":true};
>        kwArgs.mimetype="text/xml";
>        kwArgs.load=(function(){tapestry.load.apply(this, arguments);});
> }
> Is it bug?

-- 
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: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org