On Thu, 10 Jul 2014 11:09:05 -0300, Davide Vecchi <d...@amc.dk> wrote:


If I do

        Node node = element.getChildren().get(0);

I do get a org.apache.tapestry5.dom.Node representing the element's content (its toString() just returns "Hello"), but even this Node object doesn't seem to me to have methods to change its content.

Node is the abstract superclass of Element and Text, so you'll need to cast them before doing more useful stuff.

Or maybe I should create a new Node instance containing the text I want and then use this instance to replace the existing Node instance in the children list, like

        element.getChildren().set(0, newNode);

That's an option too.

--
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br

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

Reply via email to