Thanks Thiago! U r the man!!! :) I will try the first approach it looks a lot easier to maintain.
On Sat, Jan 16, 2010 at 11:20 AM, Thiago H. de Paula Figueiredo <thiag...@gmail.com> wrote: > On Sat, 16 Jan 2010 14:11:22 -0200, Juan E. Maya <maya.j...@gmail.com> > wrote: > >> Hi all, > > Hi! > >> I am in a kind of a big dilema now. I am trying to implement a basic >> CMS using Tapestry. One of the requirements is that the user will be >> able to modify their own templates. I have already seen some >> approaches in the mailing list to read the tmls files from different >> locations what gives me hope. > > That's what I would do: the user-edited pages would be generated by > Freemarker. Period. Tapestry templates were made to be used by developers. > To fit Freemarker inside a Tapestry application, I would create a page that > returns a TextStreamResponse in its onActivate() method. > Or a normal page (so we could use a layout component) and then use the > OutputRaw component to generate the Freemarker output. > >> My problem right now is that the templates may contain a scripting >> language (Freemarker). My question is where would be the best place to >> plug the Freemarker processing. I was planning to add a new >> PageRenderRequestFilter that would take the response after the page is >> render and send it to Freemarker but i am still not sure how to get >> the current servlet response InputStream. > > From a quick seconds look at the Tapestry sources, maybe you could override > the internal PageResponseRenderer service to do that. > > -- > Thiago H. de Paula Figueiredo > Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and > instructor > Owner, software architect and developer, Ars Machina Tecnologia da > Informação Ltda. > http://www.arsmachina.com.br > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org