You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2014/06/22 22:50:25 UTC

[jira] [Commented] (TAP5-2230) AjaxFormLoop Add Row Broken

    [ https://issues.apache.org/jira/browse/TAP5-2230?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14040243#comment-14040243 ] 

ASF subversion and git services commented on TAP5-2230:
-------------------------------------------------------

Commit fbd7d031e2753411c540dd00d2c3c8d8753dd89c in tapestry-5's branch refs/heads/master from [~thiagohp]
[ https://git-wip-us.apache.org/repos/asf?p=tapestry-5.git;h=fbd7d03 ]

Some adjustments for TAP5-2230


> AjaxFormLoop Add Row Broken
> ---------------------------
>
>                 Key: TAP5-2230
>                 URL: https://issues.apache.org/jira/browse/TAP5-2230
>             Project: Tapestry 5
>          Issue Type: Bug
>    Affects Versions: 5.4
>            Reporter: Peter H
>            Assignee: Thiago H. de Paula Figueiredo
>              Labels: month-of-tapestry
>             Fix For: 5.4
>
>
> We're using 5.4.26 but have seen this in 5.4.25 too so assume it's a fairly long-standing issue in the alphas.
> Use ajaxformloop, click add row, check your browser's console, see client-side error as follows:
> Uncaught TypeError: Object <DIV class="trowandloadsmoremarkupbesidesthatistheentirecontentsofyourajaxformloop</DIV> has no method 'trigger' 
> Look at ajaxformloop.js, see lines 42-44.
> newElement = "<" + insertionPoint.element.tagName + " class=\"" + insertionPoint.element.className + "\"\n  data-container-type=\"" + FRAGMENT_TYPE + "\">\n  " + content + "\n  </" + insertionPoint.element.tagName + ">";
>           insertionPoint.insertBefore(newElement);
>           return newElement.trigger(events.zone.didUpdate);
> Change them to the following:
> {code}
> newElement = "<" + insertionPoint.element.tagName + " class=\"" + insertionPoint.element.className + "\"\n  data-container-type=\"" + FRAGMENT_TYPE + "\">\n  " + content + "\n  </" + insertionPoint.element.tagName + ">";
> newElement = insertionPoint.insertBefore(newElement);
>           return newElement.trigger(events.zone.didUpdate);
> {code}
> Note the missing assignment of the newElement after its insertion. We are calling trigger on a string. And all is fixed. :D



--
This message was sent by Atlassian JIRA
(v6.2#6252)