try this...

public void onSubmit() {
        File file = generatePdfReport();
        ResourceStreamRequestTarget target = new 
ResourceStreamRequestTarget(new         
FileResourceStream(new org.apache.wicket.util.file.File(file)));
        target.setFileName("Filename.pdf");
        RequestCycle.get().setRequestTarget(target);
}


harald


kenixwong schrieb:
> Once i click the "Generate Report" Button, the onSubmit function of 
> button will called and generate a report in pdf format. Once the report 
> is generated, i need it immediately display in the browser (either 
> current page or pop up page). Anyone can help ? note: The Report is 
> implemented with iText.
> ------------------------------------------------------------------------
> View this message in context: wicket - Load the pdf file after onSubmit 
> <http://www.nabble.com/wicket---Load-the-pdf-file-after-onSubmit-tf3808639.html#a10779302>
> Sent from the Wicket - User mailing list archive 
> <http://www.nabble.com/Wicket---User-f13976.html> at Nabble.com.
> 
> 
> ------------------------------------------------------------------------
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to