On 3/21/06, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> why not just push a download request target into the request cycle? it works
> for 1.2. search this list for "excel"
So if I were to use the request target approach I would do:
protected void onSubmit() {
getRequestCycle().setRequestTarget(new PageRequestTarget(new
ExportPage(data)););
WebResponse wr=(WebResponse)getResponse();
wr.setContentType("excel/ms-excel; name=" + msExcelFilename);
wr.setHeader("content-disposition",
"attachment;filename=" + msExcelFilename);
}
>
> -Igor
>
>
>
> On 3/21/06, Eelco Hillenius <[EMAIL PROTECTED]> wrote:
> > That has to do with the page render strategy. A way around this is to
> > change that strategy, but a much better solution is to make your PO
> > worksheet a resource instead of a page. Please check out
> > wicket-stuff's JasperReports integration for an idea how to do this.
> >
> > Eelco
> >
> > On 3/21/06, Mats Norén <[EMAIL PROTECTED]> wrote:
> > > Hi,
> > > I'm trying to export a POI worksheet as a download link in my wicket
> page.
> > > The link sets the responsepage to a download page in which
> > > trying to get the outputbuffer to write to. Only problem is that I
> > > keep getting this:
> > > "java.lang.UnsupportedOperationException: Cannot get
> output stream on
> > > BufferedResponse"
> > >
> > > I looked at the code from the wicket-examples display-tag export the
> > > only thing I do differently is the way the page is created.
> > >
> > > The weird thing is that I only get it if I instantiate my response like:
> > > setResponsePage(new DownloadPage(data));
> > >
> > > if I do
> > > setResponsePage(DownloadPage.class) it behaves correctly...
> > >
> > > I need to be able to pass data into the class...what am I missing here?
> > >
> > > /Mats
> > >
> > >
> > > -------------------------------------------------------
> > > This SF.Net email is sponsored by xPML, a groundbreaking scripting
> language
> > > that extends applications into web and mobile media. Attend the live
> webcast
> > > and join the prime developer group breaking into this new coding
> territory!
> > >
> http://sel.as-us.falkag.net/sel?cmdlnk&kid0944&bid$1720&dat1642
> > > _______________________________________________
> > > Wicket-user mailing list
> > > [email protected]
> > >
> https://lists.sourceforge.net/lists/listinfo/wicket-user
> > >
> >
> >
> > -------------------------------------------------------
> > This SF.Net email is sponsored by xPML, a groundbreaking scripting
> language
> > that extends applications into web and mobile media. Attend the live
> webcast
> > and join the prime developer group breaking into this new coding
> territory!
> >
> http://sel.as-us.falkag.net/sel?cmdlnk&kid0944&bid$1720&dat1642
> > _______________________________________________
> > Wicket-user mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> >
>
>
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user