Thank you very much! That is incredibly helpful! Sorry if I sounded angry. It wasn't my intent.
-----Original Message----- From: Jesse Kuhnert [mailto:[EMAIL PROTECTED] Sent: Friday, December 30, 2005 10:08 AM To: Tapestry users Subject: Re: How does one control rendering? Hmmm...Your email sounds very angry. I will answer it anyways. All content in tapestry is written to a IMarkupWriter class instance, which is similar to a markup tag output buffer. There are a few services involved in taking an incoming response and rendering output. Like DirectService. If I were trying to "capture" the output of a response and play with it I would probably try extending/overriding one of these services. I would reccomend taking a look at the XTileService in the contrib library of tapestry, or for a much more complicated example you can look at http://tacos.sourceforge.net. I'm doing exactly what you describe by passing an instance of NestedMarkupWriter to the response, which is in effect a StringBuffer instance that you can grab the content from when your response is done rendering. I use all of this to play around with ajax features. On 12/30/05, Rusty Phillips <[EMAIL PROTECTED]> wrote: > > Your approach was the one that I reasoned was probably what to do, and > suggested in my last e-mail that got no response. My guess is that > nobody knows how to do this, its impossible, or I'm way off how to do > it. I'm hoping it's the last thing. If Tapestry is so inflexible that > you can't even do something as simple as coupling its templating engine > with another engine and rendering to things besides text, then it's > never going to take off because it means that migration is nearly > impossible, and it doesn't scale beyond simple HTML page generation. > > "to render HTML" > > How? I mean, how do I actually look at the output? All the pages in > the examples I've seen look like glorified Beans. I've yet to see how > you actually render the output. Do I call render? How do I feed it > what it needs so that it will actually spit out an output? Then what do > I override to make it return to the browser correctly? > > And once I've got the output in some other transformed format, how do I > change the HTTP headers to match the new form of output? > > > -----Original Message----- > From: Jorge Quiroga [mailto:[EMAIL PROTECTED] > Sent: Thursday, December 29, 2005 5:15 PM > To: Tapestry users > Subject: Re: How does one control rendering? > > I'm newbie too, but until I can read you can: > > 1) Use insert component > 2) Do a kind of component (.jwc) and a Java class that inherits from > BasePage or implements IPage that serve you as a template to render HTML > > and do the transformations you need (at least at data level and until > certain point to components inside see Block and RenderBlock -see the > documentation for deeper info-) in descendant pages > > I'm not sure if I undestood well your question but I hope this can help > you > > Jorge Quiroga > > Rusty Phillips wrote: > > Pardon the possibly newbish question, but I can't seem to find a > simple > > way to do this relatively simple thing. > > > > > > > > I would very much like to get the entire contents of a page in already > > rendered format (i.e. a string, or an output buffer, or a response > > object of some kind), transform it, and then send it to the browser. > > This is ultimately alluding to in my last e-mail. > > > > > > > > Since this is ultimately a property of the type of page that I am > using, > > I would really like to do this using a class extended from IPage, or > > from BasePage. > > > > > > > > How does one go about this? > > > > > > > > And if it's impossible, then is it possible to use this framework > along > > with servlet filters without screwing everything up totally? Its > > lower-level than I would like, but these should be able to do what I'm > > looking for. > > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
