You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Jochen Kemnade (JIRA)" <ji...@apache.org> on 2014/05/27 09:20:32 UTC

[jira] [Updated] (TAP5-518) MarkupWriter.write() writes to deleted nodes

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

Jochen Kemnade updated TAP5-518:
--------------------------------

    Labels: bulk-close-candidate  (was: tapestry5-review-for-closing)

This issue has been last updated about 1.5 years ago, has no assignee, affects an old version of Tapestry that is not actively developed anymore, and is therefore prone to be bulk-closed in the near future.

If the issue still persists with the most recent development preview of Tapestry (5.4-beta-6, which is available from Maven Central), please update it as soon as possible. In the case of a feature request, please discuss it with the Tapestry developer community on the dev@tapestry.apache.org mailing list first.


> MarkupWriter.write() writes to deleted nodes
> --------------------------------------------
>
>                 Key: TAP5-518
>                 URL: https://issues.apache.org/jira/browse/TAP5-518
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.0.16
>         Environment: tested on Tapestry versions 5.0.18, 5.0.17 (could not select in list for this issue)
> Windows Vista Service Pack 1, Eclipse 3.4.1 Build M20080911-1700, Run Jetty Run Plugin 1.0.1
>            Reporter: Daniel Beck
>            Priority: Minor
>              Labels: bulk-close-candidate
>
> Description
> When removing a child text node from the current element, subsequent write()s ware still written to the removed node.
> Reproduce:
> public void test(MarkupWriter writer) {
>   writer.element("a");
>   writer.write("foo");
>   writer.getElement().removeChildren();
>   writer.write("bar");
>   writer.end();
> }
> Expected Result:
> <a>bar</a>
> Actual Result:
> <a></a> (5.0.18)
> <a/> (5.0.17)
> Notes
> MarkupWriter.write() is documented as: "Writes the text as a child of the current element" (5.0.17), suggesting that if there is no child text node, a new one is created.
> MarkupWriterImpl (in 5.0.17) holds a reference to the text node, but does not verify the node is still a child of the current node when write()ing to it.
> Workaround: Create a child <span> or other element which is basically ignored when rendering, but modifying the document might not work for everyone.



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