You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Alinoor <al...@islamicdesignhouse.com> on 2012/01/07 09:03:21 UTC

Generating Dynamic PDF using AjaxFallbackButton

Hi,

I'm trying to generate a PDF dynamically on a AjaxFallbackButton.submit(),
the code works fine with a normal Button. I've noticed that instead of the
browser showing a download/open dialog for the pdf, the wicket ajax debug
windows seems to have picked up the content of the PDF.

I'm not sure if this is a bug, or am I meant to set something to get the
download/open dialog for the pdf?

I've attached a complete code example, the first button uses the
AjaxFallbackButton and the second uses a Button.

Thanks,
Alinoor 
http://apache-wicket.1842946.n4.nabble.com/file/n4272343/ajaxpdf.tgz
ajaxpdf.tgz 

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Generating-Dynamic-PDF-using-AjaxFallbackButton-tp4272343p4272343.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Generating Dynamic PDF using AjaxFallbackButton

Posted by Alinoor <al...@islamicdesignhouse.com>.
Hi,

Thanks, the link was helpful.

The difference seems to be that, for ajax requests, a
ResourceStreamRequestHandler needs to be used instead of a
ResourceRequestHandler e.g. 

RequestCycle.get().scheduleRequestHandlerAfterCurrent(new
ResourceStreamRequestHandler(new AResourceStream(), "foo.pdf"));


Thanks,
Alinoor

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Generating-Dynamic-PDF-using-AjaxFallbackButton-tp4272343p4272422.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Generating Dynamic PDF using AjaxFallbackButton

Posted by Alinoor <al...@islamicdesignhouse.com>.
The link helped, thanks!
Alinoor

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Generating-Dynamic-PDF-using-AjaxFallbackButton-tp4272343p4272545.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Generating Dynamic PDF using AjaxFallbackButton

Posted by Ernesto Reinaldo Barreiro <er...@jweekend.com>.
This link might be useful to you.

https://cwiki.apache.org/WICKET/ajax-update-and-file-download-in-one-blow.html


-- 
Regards - Ernesto Reinaldo Barreiro
jWeekend
Training, Consulting, Development
http://jWeekend.com <http://jweekend.com/>

Re: Generating Dynamic PDF using AjaxFallbackButton

Posted by Abigail <ab...@yahoo.com>.
HI there
In modern enterprise's document management system, people often need to
process and handle large volumes of multi-page PDF document files.
Therefore, a professional  PDF document page processing
<http://www.rasteredge.com/how-to/csharp-imaging/pdf-processing/>   utility
will bring much convenience for users to manipulate and manage those PDF
files, especially when they are processing some PDF document files that have
over 500+ pages.

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Generating-Dynamic-PDF-using-AjaxFallbackButton-tp4272343p4664660.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org