First thought -- have you tried wrapping the javascript in a CDATA tag? There are some examples at http://en.wikipedia.org/wiki/CDATA
On Mon, Apr 23, 2012 at 8:10 PM, yazdog8 <j...@paulsenweb.com> wrote: > I'm trying to use handlebars.js to generate some DOM code on a file upload > widget (so there is no going to the server for a generated TML file...just > no need). There are two ways to do this...you can include the handlebars > template on the page (faster, easier and non cacheable) as opposed to > including a JS file (cacheable, you have to wait to download it). Here's my > code: > > > > It sits inside a TML file that is called into the page as a component. My > problem is this...Tapestry is validating this file, or at least attempting > to validate this as a valid TML file. It has a problem with the line that > has the TD tag with the #unless. > > Failure parsing template > classpath:com/beckon/app/components/widgets/form/FileUploadQueue.tml: > Element type "td" must be followed by either attribute specifications, ">" > or "/>". > > This is valid as far as handlebars is concerned. And in a script tag. I just > can't for the life of me understand why it's exceptionally difficult to do > modern JS like this in Tapestry without jumping through hoops to do > something that conceptually should be fairly simple in any other > environment. Am I being forced to move this into a JS file and include it > because of this? Seems somewhat silly to me. > > Is there a parameter I can pass the t:content to not parse this? Has anyone > encountered this problem before? Sorry to seem somewhat cranky, I just run > into these problems frequently and it gets very frustrating. It would be > nice if JS wasn't treated as such a second class citizen in this framework. > > -- > View this message in context: > http://tapestry.1045711.n5.nabble.com/Tapestry-and-inline-Handlebars-js-tp5660756p5660756.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 > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org