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

Reply via email to