tapestry-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jesús Ramos <jra...@legosoft.com.mx>
Subject ISSUE WHEN WRITING OUT XML WITH TAPESTRY
Date Sun, 17 Aug 2003 18:39:37 GMT
Good day, list!

I've found an issue when writing out XML documents with Tapestry.
I assumed that I had to implement a writer (obviuosly implementing IMarkupWriter) whose content
type was "text/xml", then
write out the document elements using the @Any component. However, there seems to be
a problem in the writer, for it outputs nothing, until you remove the getWriter method you
overrode to enable it.

Any idea why this happens?
Is this issue on the framework's side, or on my writer's side?

The following are the only methods and member variables not required by IMarkupWriter interface
that I added to my writer:

private String _content = null;

public XWriter(OutputStream stream, String contentType) {
_content = contentType;
OutputStreamWriter owriter = new OutputStreamWriter(stream);
Writer bwriter = new BufferedWriter(owriter);
_writer = new PrintWriter(bwriter);
}

/**
*    returns a plain-text writer if no writer is specified in constructor.
*/
public String getContentType() {
return (_content == null ? "text/plain" : _content);
}

Best regards.

J. Ramos



Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message