Re: Extensions to allow introspection of Freemarker template

"Wong, Christopher" <[email protected]> Mon, 2 Jun 2014 11:02:22 -0400
Newsgroups gmane.comp.web.freemarker.devel
Message-ID <5900C695468EF8469DF7867FD277BA1E95A1747C2B@PMACPWEXCLS01.corp.epsilon.com>
Thanks for the feedback, David. Your approach will work if you have some control over the data model. That is unfortunately not an option for me right now, but it’s great that you can take that approach.

Chris


From: David Levine [mailto:[email protected]]
Sent: Thursday, May 29, 2014 4:10 PM
To: FreeMarker-devel
Subject: Re: [Freemarker-devel] Extensions to allow introspection of Freemarker template

Hello Christopher,

Do you want to parse the freemarker HTML to pull out the freemarker variable references so you can create a data model that will work for any given freemarker template?  I can see why you'd want to do that.  You need want to live with some restrictions in terms of what you might pick up automatically by introspection.

In our case, what we do is define the data model separately in an XML file, such that the data model matches what the form expects.  From that data model, we generate a form that a user can fill out, and from that form input we generate the data model which will match what the HTML expects (in terms of Freemarker variable references).

Hope that helps!

David

________________________________
This e-mail and files transmitted with it are confidential, and are intended solely for the use of the individual or entity to whom this e-mail is addressed. If you are not the intended recipient, or the employee or agent responsible to deliver it to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you are not one of the named recipient(s) or otherwise have reason to believe that you received this message in error, please immediately notify sender by e-mail, and destroy the original message. Thank You.

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their 
applications. Written by three acclaimed leaders in the field, 
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech

_______________________________________________
FreeMarker-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freemarker-devel