This is expected behavior. MarkupWriter.getElement() returns the current XML
element on the stack that has not been closed (ie markupWriter.end() has not
been called for the element). Since all TML templates are well formed XML
and hence end() every element thus popping it off of the stack.

What you are witnessing is also the cause of this issue
https://issues.apache.org/jira/browse/TAP5-1918

The jira provides a solution to find the lastChild of
MarkupWriter.getElement(). This will be the element rendered by your
template.



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/T5-3-6-AfterRenderTemplate-getElement-returns-element-of-parent-component-tp5718513p5718515.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to