tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter H (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (TAP5-2230) AjaxFormLoop Add Row Broken
Date Wed, 20 Nov 2013 15:21:35 GMT

     [ https://issues.apache.org/jira/browse/TAP5-2230?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Peter H updated TAP5-2230:
--------------------------

    Description: 
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.

{code}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);
{code}

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}

And all is fixed. :D

  was:
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.

[code]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);
[code]

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]


> 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
>
> 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.
> {code}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);
> {code}
> 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}
> And all is fixed. :D



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Mime
View raw message