You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Bob Harner <bo...@gmail.com> on 2017/03/22 19:35:16 UTC

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">
    Delete...
</t:eventlink>

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">
    Delete...
</t:eventlink>

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