You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Andreas Bohnert <ab...@weberhofer.at> on 2011/12/01 12:46:31 UTC

Re: best way to call serverside from js with tap 5.3

thanks barry,

this works very well, but there is one thing I can't figure out with 
this mixin:

how do I know on js side if my tap event handler fails for some reason?
(I trigger a custom event from js and would like to know if and for what 
reason my tap handler failed to take measures on js side according to 
the failure code)

thanks,
Andreas

Barry Books schrieb:
> Take a look at bind in the jQuery module.
>
> https://github.com/got5/tapestry5-jquery/blob/master/src/main/java/org/got5/tapestry5/jquery/mixins/Bind.java
>
> https://github.com/got5/tapestry5-jquery/blob/master/src/main/resources/org/got5/tapestry5/jquery/assets/mixins/bind/bind.js
>
> It's a mixin that binds jQuery events to Tapestry event handlers. It
> also handles zone updates.
>
> ---------------------------------------------------------------------
> 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: best way to call serverside from js with tap 5.3

Posted by Barry Books <tr...@gmail.com>.
It would be very handy to be able to throw exceptions on the Tapestry
side and catch them on the javascript side. If you figure out a way
please post it here.

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


Re: best way to call serverside from js with tap 5.3

Posted by Andreas Bohnert <ab...@weberhofer.at>.
Ok, I see. Thanks!
I will dig deeper into ajaxResponseRenderer.addCallback. it comes close 
to what I want.

thank you!

Barry Books schrieb:
> The simple answer is you don't. I think in 5.3 exceptions are encoded
> as JSON and you can figure this out but the current code has no error
> checking. You could always return a different zone for errors.
>
> ---------------------------------------------------------------------
> 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: best way to call serverside from js with tap 5.3

Posted by Barry Books <tr...@gmail.com>.
The simple answer is you don't. I think in 5.3 exceptions are encoded
as JSON and you can figure this out but the current code has no error
checking. You could always return a different zone for errors.

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