Tapestry Confirm mixin doesn't work with async="true" parameter

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
Report Content as Inappropriate

Tapestry Confirm mixin doesn't work with async="true" parameter

Has anybody else seen this? When I have an eventlink (and presumably
actionlink and other types of links) with async="true", like this:

<t:eventlink t:id="deleteItem" async="true" context="item" t:mixins="confirm">

then when I click OK on the confirmation dialog, the request is sent
BOTH via xhr and as a regular full-page request. (Naturally, the
second one fails because the item has already been deleted.)

If I change to the following, then only the xhr request is sent (which
is correct):

<t:eventlink t:id="deleteItem" zone="^" context="item" t:mixins="confirm">

I guess this is because in the first case the hyperlink contains a
data-async-trigger="true" attribute, but in the second case it
contains a data-update-zone="^" attribute instead, and the
confirm-click JavaScript/CoffeeScript contains this:

      return if @attr "data-update-zone"

but nothing for the data-async-trigger attribute.

To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]