[FMPP] usage of Dataloaders in non-fmpp Java programs
Brought to you by:
ddekany
|
From: Thomas B. <tb...@ba...> - 2006-06-25 18:26:01
|
Hello, I wrote a nice template set to create a big static website from some CSV-Files. But now I need to create some of the pages dynamically, so I will have to use Tomcat, write a web container and call FMPP (or Freemarker?) directly. As I see it is not easy to access the loaded data from within Java. I can't just simply say "load the configuration data into this hash", deal with the data in Java and say "use this hash with FMPP and create my output". The Dataloaders (especially the CsvDataLoader) returns a TemplateModel. Would it not be nicer if it returns a simple Java-"Map"? FreeMarker would wrap it and work as before. What would happen if we try to change CsvSequence to be a Map? Your very nice configuration Syntax (tdd, reading of csv, ...) would not depend on FreeMarker. I could think of many uses of this nice Dataloaders apart from FreeMarker. Ciao, Thomas Bayen Linux User Group Krefeld |