Got it - found another hint about DownloadLink that led me to this solution:
@Override
public void onSubmit() {
ReportResource resource = new PdfReportResource(getReportName(),
getParamsModel());
getRequestCycle().scheduleRequestHandlerAfterCurrent(
OK, I've almost got it - thanks for the example.
It comes down to either using a ResourceLinkVoid which serves up the pdf
with no complaints, but despite being attached to a submit button, the form
doesn't seem to have been submitted; the parameters don't reflect any user
input
or, I can solve
Ok, below the code I use to create a link that allows to download pdf file
created by jasper on runtime. Hope it helps. Do not hesitate to ask
questions.
public class PdfGenerateLink extends ResourceLinkVoid {
public PdfGenerateLink(final String id, final IModelBid model, final
On Wed, Oct 19, 2011 at 11:46 PM, Paul Szulc paul.sz...@gmail.com wrote:
Ok, below the code I use to create a link that allows to download pdf file
created by jasper on runtime. Hope it helps. Do not hesitate to ask
questions.
public class PdfGenerateLink extends ResourceLinkVoid {
Hi,
my recent webapp is supposed to generate PDF reports. Because I don't know
much about JasperReports, I've outsourced the functionality to a
freelancer.
He created separate module (jar) that provides desired functionality.
Part of maven structure of my project looks like this:
- ngo
|
URL resource =
getClass().getClassLoader().getResource(DOCOferta.jrxml);
An aside: This is the equivalent to getClass().getResource(/DOCOferta.jrxml);
i.e. a resource on the classpath root.
Check your projects to see if the file is in the correct location to be
included at runtime.
Ok, to clarify:
1. DOCOferta.jrxml lies inside ngo.pdf module folder src/main/resources
2. When I run generate method inside of ngo.pdf modules all works fine, but
when I try to use it in webapplication (separate, differnet maven module) I
get this NPE. I know the issue is because probably
yeah, ok, my bad
resources where under src/main/resource not src/main/resource*s*
*
*
thx Tor
Paul,
I am doing something very similar - I'd be interested to know more about how
you got this working - here is what I've got that works for now, but I'm not
real happy with it:
In my report forms, I have buttons like this: (details about params omitted
- nothing fancy there)
in context:
http://apache-wicket.1842946.n4.nabble.com/wicket-jasper-reports-tp3914476p3917467.html
Sent from the Users forum mailing list archive at Nabble.com.
-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
10 matches
Mail list logo