Could someone point me to some sample code that would be an example of
how to get at the HtmlOutputText children of a myfaces HtmlDataTable?
I have been able to get/iterate the children of the header and footer
but I can't seem to reach the HtmlOutputText for the actual rows of the
HtmlDataTable.
My goal is to have a link that will let the user dump out an already
generated/sorted dataTable to excel.
My planned approach is as follows:
Bind the dataTable to an HtmlDataTable object in my backing bean.
Loop/Iterate through the HtmlDataTable adding the values of the
HtmlOutputText children to an ArrayList of String.
Loop through the ArrayList adding the html tags and put the output into
PrintWriter
Change the content type to application/vnd.ms-excel
Or along the same lines is it possible to get hold of an already
existing HtmlDataTable and hand it back out to a new page using
PrintWriter? I just want to be able to implement in a very generic way
so I can use this functionality for other parts of my application.
Any help or hints would be really appreciated.
Dennis