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-nulland 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...
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>
ValueHolderu mentioned, where is it and how to use it?
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=
falseand 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...