Hi,

I'm suing tapestry 4.0.2

Kindly help as I've been stuck for a week already, I've been trying to
convert the tapestry page into a byte output stream to save it into a file,
below is the code:

--------------------------------------------------------------------------------------
        ByteArrayOutputStream bout = new ByteArrayOutputStream();
        IMarkupWriter subwriter = new MarkupWriterImpl("text/html", new
PrintWriter(bout), new AsciiMarkupFilter());
        renderPage(subwriter, cycle);
        subwriter.flush();
        String body = new String(bout.toByteArray());
        

        File file = new File("c:\\test.html");
        try{
                FileOutputStream out = new FileOutputStream(file);
                out.write(bout.toByteArray());
                out.flush();
                out.close();
        }catch(Exception e){
                e.printStackTrace();
       }

-----------------------------------------------------------------------

The page did save into the file but the problem is all the @Insert text are
missing, the page do keep track other things like static texts and size of
the list as it displays the correct number of entries.. the only problem is
the dynamic text representing the records are missing.

But when I finally redirect to the page using the "return IPage", the
@Insert are populated, only the html saved in the file have their @Insert
dynamic content missing  

This is similar to the solution of sending tapestry page as an html format
mail, but this time, it saves the html to the disk instead of emailing it.
-- 
View this message in context: 
http://old.nabble.com/%40Insert-not-working-when-converting-tapestry-page-into-a-byteoutputstream-tp27071981p27071981.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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

Reply via email to