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

Reply via email to