You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Newgro <pe...@gmx.ch> on 2007/11/23 09:12:24 UTC

[OT] Howto load external resource (pdf) best?

Hi *,

i would like to present my order in a pdf. This is possible to achieve by
using jasperreports. There i have a template and can provide some parameters
and fields for content. The processing is clear.

But where do i have to "place" my template file. I would like to load it on
a button click. But how can i access the template? 

I know that this is only "small" wicket related. But maybe someone can give
me an url where i can read about it.

Thanks for your help
Per
-- 
View this message in context: http://www.nabble.com/-OT--Howto-load-external-resource-%28pdf%29-best--tf4860228.html#a13908353
Sent from the Wicket - User 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: [OT] Howto load external resource (pdf) best?

Posted by Per Newgro <pe...@gmx.ch>.
> If I understand correctly it looks to me that this isn't Wicket-related at
> all :) 
Sure that's why i added an [OT] :-)

> Just put the files under /any/path/for/templates and use new 
> File("/any/path/for/templates/templatename.jrxml")
> to pass them to JasperReports..
But is this realy the "web-application" way? Aren't there some restrictions on 
access resources "outside" the web-application? I thaught more on something 
like - put it into web-inf/classes and load it from there via 
getResourceAsStream or something like that. But i don't know exactly how i 
can achieve this.

Cheers
Per



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


Re: [OT] Howto load external resource (pdf) best?

Posted by Federico Fanton <ff...@ibc.it>.
On Fri, 23 Nov 2007 05:06:29 -0800 (PST)
Newgro <pe...@gmx.ch> wrote:

> So i'm looking for a solution like - load the template for "fix-location".
> And if a new template arrives i can simply put it to the "fix-location".
> 
> But how can i do this - espacially with the wicket framework.

If I understand correctly it looks to me that this isn't Wicket-related at all :) Just put the files under /any/path/for/templates and use
new File("/any/path/for/templates/templatename.jrxml")
to pass them to JasperReports..


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


Re: [OT] Howto load external resource (pdf) best?

Posted by Newgro <pe...@gmx.ch>.
Hi,

the problem is that the templates will be designed by a designer. I only get
the templates and have to deploy them. If i have to deploy the whole
application it's a hugh effort for that "little" task.

So i'm looking for a solution like - load the template for "fix-location".
And if a new template arrives i can simply put it to the "fix-location".

But how can i do this - espacially with the wicket framework.

Thanks
Per
-- 
View this message in context: http://www.nabble.com/-OT--Howto-load-external-resource-%28pdf%29-best--tf4860228.html#a13912043
Sent from the Wicket - User 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: [OT] Howto load external resource (pdf) best?

Posted by Federico Fanton <ff...@ibc.it>.
On Fri, 23 Nov 2007 03:55:32 -0800 (PST)
Newgro <pe...@gmx.ch> wrote:

> But i look for a solution where i
> can exchange the template without redeploying the whole application.

I see.. When testing inside Eclipse I just use
new File("/path/to/template.jasper")
Maybe something like that would do the trick :)


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


Re: [OT] Howto load external resource (pdf) best?

Posted by Newgro <pe...@gmx.ch>.
Hello Frederico,

thanks for the reply. Sure that is a way. But i look for a solution where i
can exchange the template without redeploying the whole application.

Cheers
Per
-- 
View this message in context: http://www.nabble.com/-OT--Howto-load-external-resource-%28pdf%29-best--tf4860228.html#a13911102
Sent from the Wicket - User 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: [OT] Howto load external resource (pdf) best?

Posted by Federico Fanton <ff...@ibc.it>.
On Fri, 23 Nov 2007 00:12:24 -0800 (PST)
Newgro <pe...@gmx.ch> wrote:

> But where do i have to "place" my template file. I would like to load it on
> a button click. But how can i access the template? 

I put .jasper files inside the jar and access them via something like this.class.getResource("/path/to/template.jasper")

Bye!


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