You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Patrik Westlund <pa...@lemonlime.se> on 2005/04/22 11:36:58 UTC

Getting html for component

Hello,

I'm trying to get the generated html for a component into a String to 
include in a html mail body, but without success.

I'm doing the following:

---
AbstractComponent comp = (AbstractComponent) getComponent("mycomp");
ByteArrayOutputStream os = new ByteArrayOutputStream();
HTMLWriter writer = new HTMLWriter("text/html", os);
comp.render(writer, cycle);
writer.close();
buf.append(os.toString());
String html = buf.toString();
---

But this only generates the static html and not the dynamic parts of the 
component. How do I get the dynamic parts generated?

I'm running this in a listener after a form submit if that might have 
something to do with it...


Thanks,

Patrik


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org