1. Is it OK to discuss libs that are not part of the MyFaces project on
the Wiki? If so I will edit down what I posted.
sure, why not; when helpful
2. I haven't done much programming like this and the code I posted could
use a once over. The methods do work but they are not pretty.
you are welcome. if someone is complaining, he should fix it.
Thanks!
Dennis
Dennis Gesker wrote:
> I'll register and try to get an entry on Monday. --drg
>
> Matthias Wessendorf wrote:
>> registration is needed.
>> no big deal
>>
>> On 7/14/06, Dennis Gesker <[EMAIL PROTECTED]> wrote:
>>> Sure. Can anyone add to the wiki?
>>>
>>> --Dennis
>>>
>>> Matthias Wessendorf wrote:
>>> > interesting in putting this to our wiki ?
>>> >
>>> >
>>> >
>>> > On 7/14/06, Dennis Gesker <[EMAIL PROTECTED]> wrote:
>>> >> Mike:
>>> >>
>>> >> Thanks for the t:buffer tip. It did exactly the trick. This was much
>>> >> better/easier than what I was going to do.
>>> >>
>>> >>
>>> >> My page pretty much worked out like the following.
>>> >>
>>> >> <h:commandLink action="#{bean.exportToExcel}">
>>> >> <h:outputText value="Export to Excel"/>
>>> >> </h:commandLink>
>>> >>
>>> >> <t:buffer into="#{bean.dtBuffer}">
>>> >> <t:dataTable... stuff
>>> >> </t:buffer>
>>> >>
>>> >> <h:outputText value="#{bean.dtBuffer}" escape="false"/>
>>> >>
>>> >> My exportToExcel method looks something like:
>>> >>
>>> >> String fileName = "exportedExcel.xls";
>>> >> String contentType = "application/vnd.ms-excel";
>>> >> FacesContext fctx = FacesContext.getCurrentInstance();
>>> >> HttpServletResponse resp =
>>> >> (HttpServletResponse)fc.getExternalContext().getResponse();
>>> >> response.setHeader("Content-disposition", "attachment;
>>> >> filename=" + fileName);
>>> >> response.setContentType(contentType);
>>> >> PrintWriter out = response.getWriter();
>>> >> out.print(dtBuffer);
>>> >> fc.responseComplete();
>>> >>
>>> >> Dennis
>>> >>
>>> >>
>>> >
>>> >
>>>
>>> --
>>> Dennis R. Gesker
>>> email: [EMAIL PROTECTED]
>>> Key Id: 0xEFA10A51
>>>
>>>
>>
>>
>
--
Dennis R. Gesker
email: [EMAIL PROTECTED]
Key Id: 0xEFA10A51
--
Matthias Wessendorf
further stuff:
blog: http://jroller.com/page/mwessendorf
mail: mwessendorf-at-gmail-dot-com