-
1. Re: iText - save to file
nickarls Sep 3, 2008 8:04 AM (in response to chuaky)I recall that the document tag places its content in a ValueHolder if it is nested in one.
One option would be to file for a feature request in the lines of
add an exportKey attribute to document that would hang the DocumentData on the key instead of redirecting if exportKey is non-null
and see what NR has to say. I'm thinking of doing something like that for excel, you could then use a Render and fetch the result... -
2. Re: iText - save to file
chuaky Sep 4, 2008 3:54 AM (in response to chuaky)hi Nicklas,
Saw ur postings at http://seamframework.org/Community/ExportToPdfOrExcelFromRichdataTable. Nice work for excel, hope there is something for the pdf?
<p:document xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:s="http://jboss.com/products/seam/taglib" xmlns:p="http://jboss.com/products/seam/pdf"> <p:paragraph>Complicated pdf charts report</p:paragraph> </p:document>
About the
ValueHolder
u mentioned, where is it and how to use it?Thank you.
-
3. Re: iText - save to file
nickarls Sep 4, 2008 9:34 AM (in response to chuaky)When I find time, I'll see if I could extract the datatable and pass it through a PDF renderer also. If there is interest, file a JIRA so I don't forget about it...
A ValueHolder is an interface that is implemented by most controls (HtmlInputHidden, HtmlInputSecret, HtmlInputText, HtmlInputTextarea, HtmlOutputFormat, HtmlOutputLabel, HtmlOutputLink, HtmlOutputText, HtmlSelectBooleanCheckbox, HtmlSelectManyCheckbox, HtmlSelectManyListbox, HtmlSelectManyMenu, HtmlSelectOneListbox, HtmlSelectOneMenu, HtmlSelectOneRadio, UIInput, UIOutput, UISelectBoolean, UISelectMany, UISelectOne).
Reading the code of the Document.encodeEnd, I get the picture that if the document has the attribute sendRedirect=
false
and you have something in the lines of<h:inputText ...> <p:document sendRedirect="false"> </p:document> </h:inputText>
The DocumentData object should end up in the value of the inputText.
I haven't tried it myself and I must say I can't get my mind around to how it can work but it's worth a try, I don't think Norman put the code there without a reason...
-
4. Re: iText - save to file
bravocharlie.seam.signup.benny.me.uk Sep 4, 2008 1:01 PM (in response to chuaky)That's a nice idea - ValueBinding to store DocumentData.
In the mean time you can achieve via this old post