I did something like this a while ago. I stored the .tml file on Amazon S3 and I wrote an S3 asset to load the template. The code is here
https://github.com/trsvax/tapestry-aws On Monday, February 29, 2016, David Diaz <d...@viddiaz.com> wrote: > Hi Jens, > > Yes I have external pages that I need to integrate. And by code I mean the > actual .java page that would (hopefully) power the .tml. > > The problem I have is that I need to (obviously) render content in a > specific way, but the application I am writing needs to load the templates > dynamically. > > Thanks, > David. > > On Mon, Feb 29, 2016 at 6:37 PM, mailingl...@j-b-s.de <javascript:;> < > mailingl...@j-b-s.de <javascript:;>> > wrote: > > > Hi David! > > > > What do you mean by "external code"? Are you talking about external > > Tapestry pages/components and tml's you need to integrate? Because you > > mentiond HTML not TML? Does "code" refer to Javascript? Is the external > > code self contained? What about an ugly but simple "iframe"? > > > > Jens > > > > > > Von meinem iPhone gesendet > > > > > Am 29.02.2016 um 05:18 schrieb David Diaz <d...@viddiaz.com > <javascript:;>>: > > > > > > Hi all, > > > > > > I have been using Tapestry for a little bit now and I have run into one > > > problem that I can't figure out how to solve. > > > > > > In my application I need to be able to load external code & HTML to > > display > > > to the user from a trusted source at run-time. Currently I have gotten > > code > > > to load fine and I am using outputraw to render the result from the > code. > > > This is pretty bad though since I have to code the HTML within the Java > > > file instead of having it templated. > > > > > > I saw that Tapestry has a "Dynamic" component that allows loading > > templates > > > from an external source but I tried using it - it tries loading a file > > from > > > the file system at page creation time... this is not suitable for my > use > > > case since I need to load it from a String and I need to do it at > render > > > time. > > > > > > I also tried messing around with DynamicTemplateParser & MarkupWriter > > but I > > > couldn't get it to bind to my properties/functions since the code is > > loaded > > > at runtime and is not defined at compile time (I would hit a NPE when > the > > > PropBindingFactory would try and locate the component). > > > > > > If anyone could suggest any way of accomplishing this (or if it's > futile > > > and I'm wasting my time), it would be really appreciated. > > > > > > Thanks, > > > David. > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > <javascript:;> > > For additional commands, e-mail: users-h...@tapestry.apache.org > <javascript:;> > > > > >