You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Steve Eynon <st...@alienfactory.co.uk> on 2011/10/18 06:59:20 UTC

[T5.3-beta-19] JS bug in Tapestry.ajaxRequest()

Using the ZoneRefresh mixin (on Firefox 5.0.1) I tried bringing down
the server to see how the Ajax call would cope with nothing to connect
to.

I got nice messages on the screen, which is good, but they read,

    "Communication with the server failed: finalOptions.onFailure does
not exist"

which I deemed bad. To cut to the chase, the error handling line 448
(ish) in tapestry.js is currently

    finalOptions.onFailure.call(this, response);

but needs to read

    finalOptions.toObject().onFailure.call(this, response);

as finalOptions is a prototype $H.

There is also a

    finalOptions.onException.call(this, ajaxRequest, e);

a few lines down which needs to be updated also.

I can make a Jira if you like and supply a patch file for the above -
but I have no idea how to write JS unit tests though!

Oh, and I'm pleased that from T5.2.6 -> T5.3.x the
"ajaxExceptionHander" typo got corrected! (Should be "Handler"!)

Cheers,

Steve.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: [T5.3-beta-19] JS bug in Tapestry.ajaxRequest()

Posted by Steve Eynon <st...@alienfactory.co.uk>.
> Even if I'm not if it will be in for 5.3GA or not please do it.

If I understood you correctly...

https://issues.apache.org/jira/browse/TAP5-1706

:)

Cheers,

Steve.



On 19 October 2011 22:43, Massimo Lusetti <ml...@gmail.com> wrote:
> On Tue, Oct 18, 2011 at 6:59 AM, Steve Eynon
> <st...@alienfactory.co.uk> wrote:
>
>> I can make a Jira if you like and supply a patch file for the above -
>> but I have no idea how to write JS unit tests though!
>
> Even if I'm not if it will be in for 5.3GA or not please do it.
>
> Cheers
> --
> Massimo
> http://meridio.blogspot.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: [T5.3-beta-19] JS bug in Tapestry.ajaxRequest()

Posted by Massimo Lusetti <ml...@gmail.com>.
On Tue, Oct 18, 2011 at 6:59 AM, Steve Eynon
<st...@alienfactory.co.uk> wrote:

> I can make a Jira if you like and supply a patch file for the above -
> but I have no idea how to write JS unit tests though!

Even if I'm not if it will be in for 5.3GA or not please do it.

Cheers
-- 
Massimo
http://meridio.blogspot.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: [T5.3-beta-19] JS bug in Tapestry.ajaxRequest()

Posted by Lenny Primak <lp...@hope.nyc.ny.us>.
I second that. I got a slightly different message (something that has to do with undefined). 
But the result is the same. If the server is down, Ajax calls aren't handled very gracefully. 



On Oct 17, 2011, at 11:59 PM, Steve Eynon <st...@alienfactory.co.uk> wrote:

> Using the ZoneRefresh mixin (on Firefox 5.0.1) I tried bringing down
> the server to see how the Ajax call would cope with nothing to connect
> to.
> 
> I got nice messages on the screen, which is good, but they read,
> 
>    "Communication with the server failed: finalOptions.onFailure does
> not exist"
> 
> which I deemed bad. To cut to the chase, the error handling line 448
> (ish) in tapestry.js is currently
> 
>    finalOptions.onFailure.call(this, response);
> 
> but needs to read
> 
>    finalOptions.toObject().onFailure.call(this, response);
> 
> as finalOptions is a prototype $H.
> 
> There is also a
> 
>    finalOptions.onException.call(this, ajaxRequest, e);
> 
> a few lines down which needs to be updated also.
> 
> I can make a Jira if you like and supply a patch file for the above -
> but I have no idea how to write JS unit tests though!
> 
> Oh, and I'm pleased that from T5.2.6 -> T5.3.x the
> "ajaxExceptionHander" typo got corrected! (Should be "Handler"!)
> 
> Cheers,
> 
> Steve.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org