Ah ... kind of looks like you figured this out a couple of hours ago.
Long day for me.

On Mon, Apr 30, 2012 at 5:33 PM, Howard Lewis Ship <hls...@gmail.com> wrote:
> The issue here is that Tapestry uses an off-the-shelf XML parser for
> the templates.  That affects how HTML-ish content is going to be
> parsed and interpreted, and also affects who content that looks like a
> Tapestry expansion (${ .... }) will be interpreted.
>
> I can see adding a new special Tapestry element that is used to
> delimit a portion of the template where expansions should by treated
> as literal text.  That could be added to 5.4.
>
> I think a better interrum solution would be to create a component that
> renders out the <script type="text/template"> tag, and reads the
> contents of a file to provide the inside content, using
> MarkupWriter.writeRaw().
>
> You could easily establish a naming convention so that the component
> would automatically read the correct file by default, and perhaps add
> some caching to ensure things are performant.
>
> In other words, move the content that is not working properly inside a
> Tapestry template outside of the template.
>
> On Tue, Apr 24, 2012 at 11:44 AM, yazdog8 <j...@paulsenweb.com> wrote:
>> So...been experimenting more...and from the fine folks at Stack
>> Overflow...this solution for pulling HTML out of CDATA. Fine point, it has
>> to be CDATA and not the JS/CSS commented CDATA.
>>
>>
>>
>>
>> You will then have to unescape the content before compiling with
>> Handlebars.compile.
>>
>> var
>> template=Handlebars.compile($("<div/>").html($('#entry-template').html()).text())
>>
>> template({'title': 'New Title', 'body' : 'New Body'})
>>
>> This actually seems to work, and the TML doesn't force validation.
>>
>> One question though...as micro templating on the client side grows in
>> popularity, are we going to seriously have client side developers
>> consistently jump through this hoop to use Mustache, Handlebars, icanhaz,
>> etc? It seems like there's a better, more direct way, and one that doesn't
>> put the onus on the FE developer to find a way around rigid Tapestry
>> convention in order to do so.
>>
>> --
>> View this message in context: 
>> http://tapestry.1045711.n5.nabble.com/Tapestry-and-inline-Handlebars-js-tp5660756p5662963.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
>>
>
>
>
> --
> Howard M. Lewis Ship
>
> Creator of Apache Tapestry
>
> The source for Tapestry training, mentoring and support. Contact me to
> learn how I can get you up and productive in Tapestry fast!
>
> (971) 678-5210
> http://howardlewisship.com



-- 
Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!

(971) 678-5210
http://howardlewisship.com

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

Reply via email to