----- Original Message ----- 
From: "Tapestry Forum User" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Wednesday, May 04, 2005 8:00 PM
Subject: Change contentType


> I'll need to generate a text list in one of my pages. I'd like the
> contentType to be "text/plain" instead of the default "text/html". Also
> I don't want to have any html tags. How can I change these settings?

I never tried myself, but try using your new BaseTextPage, something like :

public class BaseTextPage extends AbstractPage {
    public IMarkupWriter getResponseWriter(OutputStream out) {
        return new HTMLWriter("text/plain", out);
    }
}

That's the thing I've just written about at JIRA yesterday - I think it
would be great if Tapestry offered some BaseTextPage and BaseXmlPage for XML
and plain text generation, because, maybe I'm wrong, but it seems as minor
work, and I will be able to tell people around that Tapestry supports
content generation other than HTML and WML. Lot of people frown when they
here Tapestry is mainly for HTML.

I would offer pathches myself, but I dunno much about IMarkupWriters which
would probably have to be implemented specially for these cases - XMLWriter
and TextWriter....

Cheers,
Vjeran



-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.11.0 - Release Date: 29.4.2005


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to