tapestry-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Howard M. Lewis Ship" <hls...@comcast.net>
Subject RE: ISSUE WHEN WRITING OUT XML WITH TAPESTRY
Date Sun, 17 Aug 2003 19:26:13 GMT
Creating an XMLWriter is virtually identical to the WMLWriter David Solis put in; please check
your
code against it.

--
Howard M. Lewis Ship
Creator, Tapestry: Java Web Components
http://jakarta.apache.org/tapestry



> -----Original Message-----
> From: Jesús Ramos [mailto:jramos@legosoft.com.mx] 
> Sent: Sunday, August 17, 2003 2:40 PM
> To: Tapestry users
> Subject: ISSUE WHEN WRITING OUT XML WITH TAPESTRY
> 
> 
> 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
View raw message