Like I said: take a look at the jasper reports integration found at wicket-stuff svn:
http://wicket-stuff.svn.sourceforge.net/viewvc/wicket-stuff/branches/WICKET_1_2/wicket-contrib-jasperreports/src/java/wicket/contrib/jasperreports/ And for links to the resources: http://wicket-stuff.svn.sourceforge.net/viewvc/wicket-stuff/branches/WICKET_1_2/wicket-contrib-jasperreports/src/examples/java/wicket/contrib/jasperreports/examples/ReportLinksPage.java?view=markup Martijn On 1/3/07, Thullner, Robert <[EMAIL PROTECTED]> wrote: > > > I subclassed DynamicWebRessource, but I still have the problem that I do not > know how to add the RessourceState to my WebResponse for my download link. > I found the class ResourceReference but no I did not find out how to use it. > > Do I have to use the ResourceReferece Class or is there another way to get > my download working? > > Perhaps you could give me a short example > > Thanks > Robert > > > ________________________________ > Von: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] Im > Auftrag von Philip A. Chapman > Gesendet: Mittwoch, 03. Jänner 2007 12:03 > An: [email protected] > Betreff: Re: [Wicket-user] Writing byte[] to a WebResponse > > > The reason you're getting errors in MS Word is that you're converting a byte > array into a String using ByteArrayOutputStream's toString() method. A Java > String and a byte array are not always the same thing due to unicode. > > Subclass wicket.markup.html.DynamicWebResource so that it > returns the correct instance of ResourceState (also your own > implementation). Among other things, ResourceState is supposed to provide a > byte array that is the content of the download. This would be the byte > array from your database. > > On Wed, 2007-01-03 at 11:37 +0100, Thullner, Robert wrote: > > Hello > > I store a lot of MS Word and Excel files as a byte[] into my database. > I want to add a feature to download these files from the database again, but > I did not find a way to do this in Wicket, without writing the byte[] to a > File again. > > Is there a way to write a byte[] to a WebResponse? I tried the same Code, > which is available at the Export Example from Wicket > > I got my byte[] from the database and then wrote it to a > ByteArrayOutputStream.Then I used the toString() method. But if I download > the file then I get a lot of conversion errors from MS Word, so I would like > to write the byte[] directly. > > So I tried this method: response.getOutputStream().write(file); > But using this I get this error: > java.lang.UnsupportedOperationException: Cannot get output > stream on BufferedResponse > > Thanks for any help > Robert > > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ Wicket-user > mailing list [email protected] > https://lists.sourceforge.net/lists/listinfo/wicket-user > > > -- > Philip A. Chapman > > Desktop and Web Application Development: > Java, .NET, PostgreSQL, MySQL, MSSQL > Linux, Windows 2000, Windows XP > > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > > _______________________________________________ > Wicket-user mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/wicket-user > > > -- Vote for Wicket at the http://www.thebeststuffintheworld.com/vote_for/wicket Wicket 1.2.4 is as easy as 1-2-4. Download Wicket now! http://wicketframework.org ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Wicket-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/wicket-user
