|
My users ask to me the possibility to create document templates with
some precompiled fields. This is an use case: The user logs in; The user compile a form and search for some products; The user wants to have a document with products data, one document for each product found, and want to edit this document if he needs to change some text; The user print the document. Can you suggest a solution on how to achieve this? --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
This seems a typical use case for freemarker templates: you can store them in the DB, users can create/edit them without the risk of them executing arbitrary code
grtz, Ivo On 22 Feb 2012, at 23:09, Mauro wrote: > My users ask to me the possibility to create document templates with > some precompiled fields. > This is an use case: > > The user logs in; > The user compile a form and search for some products; > The user wants to have a document with products data, one document for > each product found, and want to edit this document if he needs to > change some text; > The user print the document. > Can you suggest a solution on how to achieve this? > > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > > --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
On 23 February 2012 08:37, Ivo Houbrechts <[hidden email]> wrote:
> This seems a typical use case for freemarker templates: you can store them in the DB, users can create/edit them without the risk of them executing arbitrary code I think that freemaker can solve my problem in the case the user wants to edit the document. If he wants insert some values automatically in certain parts of the document, for example the subject, the reference number and so on, and create some documents precompiled with these values I thought to create a form with subject field, reference number and so on. The user can insert the values into there fields that are printed in the documents he wants to create. Do you think it's a good solution? --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
If you (as programmer) have full control over the template, and users don't have to create/edit the templates, it is easier to use GSP's.
In this case you can indeed render a html form where the user can enter the values for the template fields. The GSP can be rendered with the PageRenderer service. I use this in one of my own projects to render html to a String and then convert this String to PDF with IText Grtz, Ivo On 26 Feb 2012, at 22:19, Mauro wrote: > On 23 February 2012 08:37, Ivo Houbrechts <[hidden email]> wrote: >> This seems a typical use case for freemarker templates: you can store them in the DB, users can create/edit them without the risk of them executing arbitrary code > > I think that freemaker can solve my problem in the case the user wants > to edit the document. > If he wants insert some values automatically in certain parts of the > document, for example the subject, the reference number and so on, and > create some documents precompiled with these values I thought to > create a form with subject field, reference number and so on. > The user can insert the values into there fields that are printed in > the documents he wants to create. > Do you think it's a good solution? > > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > > --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
| Powered by Nabble | See how NAML generates this page |
