Yeah, it'd be a really nice feature. Right now I'm using velocity tools to accomplish this... and velocity has a dependency on Struts.
So I have JARs for three templating engines (Tapestry, Velocity, and Struts) in my WAR! :-) -----Original Message----- From: Chris Lewis [mailto:[EMAIL PROTECTED] Sent: Friday, February 29, 2008 9:33 AM To: Tapestry users Subject: Re: T5: File generation You can get a reference to the server-side (dom) document, which will contain generated markup, but I am almost certain that you can't write code like you mentioned (pass a component instance into a kind of rendered). The stream return is to make different http responses easy, including binary files (images etc), xml, plain text, etc. You _may_ be able to hack your way to what you want, but I can't imagine it would be clean and I'm sure you'd have to meddle with internal classes. Good luck - I'm sure others would be interested in your progress. sincerely, chris Joel Wiegman wrote: > The type of file doesn't really matter here. I just want to leverage > the Tapestry templating engine. > > For example, say my TML looked like this: > > <t:loop source="entries" value="entry"> ENTRY NAME: ${entry.name} > ENTRY ADDRESS: ${entry.address} </t:loop> > > I'd of course need to remove the HTML validation that Tapestry does > for me, but I'm guessing that's configurable? > > Since Tapestry supports a Stream as a return value, I'm guessing that > there's some sort of support for this. > > MyComponent is just a representation of a POJO (might be > Tapestry-annotated, might not). > > -----Original Message----- > From: Chris Lewis [mailto:[EMAIL PROTECTED] > Sent: Friday, February 29, 2008 8:59 AM > To: Tapestry users > Subject: Re: T5: File generation > > I'm fuzzy on your goal. What 'files' do you want to make? You want the > generated markup of a component? A page? > For the record, I'm fairly sure T5 is specifically designed to avoid > semantics like: > > MyComponent component = new MyComponent(); component.setName("Test"); > > Components don't 'exist' like that. > > chris > > Joel Wiegman wrote: > >> Hello all, >> >> Our application has the need to generate files. >> >> I'm interested in trying to use Tapestry to do this since we're >> already using T5 on the presentation layer. >> >> Has anyone extracted the Tapestry templating engine to do other >> processing? Something like the pseudo-code below: >> >> // BEGIN >> >> @Inject >> ComponentRenderer cr; >> >> MyComponent component = new MyComponent(); component.setName("Test"); >> >> OutputStream os = cr.render(component); >> >> // END >> >> Can anyone point me to the right package/class to look at for >> something like this? >> >> Thanks! >> >> Joel >> >> --------------------------------------------------------------------- >> 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] > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]