Martin, I tried and came back :) Could you clarify how you suggest
response.renderCSSReference to pass parameters which are then
retrieved in ResourceReference#getName()
On Wed, Sep 12, 2012 at 4:26 PM, Alec Swan alecs...@gmail.com wrote:
Maybe you could simply use
in YourComponent.java:
PageParameters params = new PageParameters();
params.set(0, css);
params.set(1, styles.css);
url = urlFor(new MountedResourceReference(), params);
response.renderCSSReference(url)
in MyApp#init():
mountResource(global, new MountedResourceReference());
in
@wicket.apache.org
Subject: Re: Wicket 1.5 migration questions
I take it by global you mean http://myServer:###/myWebApp/global?
Yes.
If so, why don't you just add the folder to the root of your war?
Good point, I could do that, but I'd rather keep my current folder
structure.
So, does it mean
~ Thank you,
Paul Bors
-Original Message-
From: Alec Swan [mailto:alecs...@gmail.com]
Sent: Tuesday, September 11, 2012 11:42 AM
To: users@wicket.apache.org
Subject: Re: Wicket 1.5 migration questions
I take it by global you mean http://myServer:###/myWebApp/global?
Yes.
If so
:04 AM
To: users@wicket.apache.org
Subject: Re: Wicket 1.5 migration questions
Hi Alec,
See my previous response. Try it and then come back.
On Wed, Sep 12, 2012 at 5:43 PM, Alec Swan alecs...@gmail.com wrote:
Paul, I looked at IResource and ResourceReference classes but still
can't figure out
Wicket-er.
-Original Message-
From: Martin Grigorov [mailto:mgrigo...@apache.org]
Sent: Wednesday, September 12, 2012 11:04 AM
To: users@wicket.apache.org
Subject: Re: Wicket 1.5 migration questions
Hi Alec,
See my previous response. Try it and then come back.
On Wed, Sep 12, 2012
you,
Paul Bors
PS: Wicket itself is full of examples, the power of open source :)
-Original Message-
From: Alec Swan [mailto:alecs...@gmail.com]
Sent: Wednesday, September 12, 2012 2:00 PM
To: users@wicket.apache.org
Subject: Re: Wicket 1.5 migration questions
I tried Martin's
PackageResourceReference IS-A ResourceReference and neither has a no-arg
constructor.
My point exactly. That's why I can't just do mountResource(/global,
new MyRR()) as Martin suggested.
To see examples of how to implement your own PackageResourceReference take a
look at its children such as
On 12.09.2012 21:38, Alec Swan wrote:
PackageResourceReference IS-A ResourceReference and neither has a no-arg
constructor.
My point exactly. That's why I can't just do mountResource(/global,
new MyRR()) as Martin suggested.
My quick try:
public class MyPackageResourceReference extends
Thanks, Christoph.
I tested your implementation and was able to pull
global/css/styles.css from the browser.
However, the following code threw an exception:
response.renderCSSReference(new
MyPackageResourceReference(MyResources.class, css/styles.css),
screen);
I also tried:
On 12.09.2012 22:50, Alec Swan wrote:
I tested your implementation and was able to pull
global/css/styles.css from the browser.
However, the following code threw an exception:
response.renderCSSReference(new
MyPackageResourceReference(MyResources.class, css/styles.css),
screen);
Maybe you
Maybe you could simply use
response.renderCSSReference(getRequest().getContextPath() +
/global/css/styles.css);
or is there a problem with it?
That didn't fix request.getUrl().toString() returning an empty string
when called from ResourceReference.getExtension()
you,
Paul Bors
-Original Message-
From: Alec Swan [mailto:alecs...@gmail.com]
Sent: Monday, September 10, 2012 7:43 PM
To: users@wicket.apache.org
Subject: Re: Wicket 1.5 migration questions
Any update on this? How can I mount CSS and JS resources under /global/
without having to do
I take it by global you mean http://myServer:###/myWebApp/global?
Yes.
If so, why don't you just add the folder to the root of your war?
Good point, I could do that, but I'd rather keep my current folder structure.
So, does it mean that putClassAlias functionality is gone in 1.5?
Thanks,
an existing one :)
http://wicket.apache.org/apidocs/1.5/org/apache/wicket/request/resource/IRes
ource.html
~ Thank you,
Paul Bors
-Original Message-
From: Alec Swan [mailto:alecs...@gmail.com]
Sent: Tuesday, September 11, 2012 11:42 AM
To: users@wicket.apache.org
Subject: Re: Wicket 1.5
Any update on this? How can I mount CSS and JS resources under
/global/ without having to do a mountResource() for every such file?
Thanks,
Alec
On Thu, Sep 6, 2012 at 12:07 PM, Alec Swan alecs...@gmail.com wrote:
But I want JavaScript files to be compresses by
JavaScriptResourceReference and
In 1.4 I had the following classes in com.myco.app.res package:
GlobalJavascriptResourceReference extends JavaScriptResourceReference
GlobalCompressedResourceReference extends PackageResourceReference
GlobalResourceScope
And Application had the following code:
extend PackageResourceReference and override its #getName() to read
the name from the request path/parameters
mountResource(/global, new MyPRR())
On Thu, Sep 6, 2012 at 7:57 PM, Alec Swan alecs...@gmail.com wrote:
In 1.4 I had the following classes in com.myco.app.res package:
But I want JavaScript files to be compresses by
JavaScriptResourceReference and CSS be served as
PackageResourceReference. How do I mount them both under /global URL
suffix?
On Thu, Sep 6, 2012 at 12:02 PM, Martin Grigorov mgrigo...@apache.org wrote:
extend PackageResourceReference and override
Take a look at the migration guide, this will answer some (if not all) of your
questions:
https://cwiki.apache.org/WICKET/migration-to-wicket-15.html
-Tom
On 04.09.2012, at 02:36, Alec Swan alecs...@gmail.com wrote:
Hello,
I finally decided to bite the bullet and migrate to Wicket 1.5.
I used that migration guide during the migration but none of the
questions in my original post were answered there.
Alec
On Tue, Sep 4, 2012 at 12:44 AM, Thomas Götz t...@decoded.de wrote:
Take a look at the migration guide, this will answer some (if not all) of
your questions:
Please see my inline comments.
Cheers,
-Tom
On 04.09.2012, at 02:36, Alec Swan alecs...@gmail.com wrote:
* How to implement HybridUrlCodingStrategy in 1.5?
Please have a look at
http://wicketinaction.com/2011/07/wicket-1-5-mounting-pages/
* I saw a ticket related to putClassAlias,
Thanks, Tom.
I saw the link explaining how to migrate
SharedResources#putClassAlias(GlobalResourceScope.class, global)
before but was found it confusing because global and images
aliases 1.4 version were replaced with imgres in 1.5 example.
All I need to do is use global in place of
I didn't get your usecase exactly yet, but maybe this will help you:
http://wicketinaction.com/2011/07/wicket-1-5-mounting-resources/
Cheers,
-Tom
On 04.09.2012, at 17:33, Alec Swan alecs...@gmail.com wrote:
I saw the link explaining how to migrate
Tom,
I have com.myco.app.res.GlobalResourceScope.class and events.js in the
same package. So, putClassAlias(GlobalResourceScope.class, global)
in 1.4 would allow me to access http://../app/global/events.js in the
browser.
It seems like in 1.5 this is similar to mountPackage(String, Class?
Well, mountPackage did not work for me either.
Basically, what I want to do is access ALL resources in
com.myco.app.res package with global URL prefix. For example, access
a JavaScript file as global/events.js instead of
../wicket/resource/com.myco.app.res.GlobalResourceScope/events.js URL.
In
-Original Message-
From: Alec Swan [mailto:alecs...@gmail.com]
Sent: Tuesday, September 04, 2012 5:18 PM
To: users@wicket.apache.org
Subject: Re: Wicket 1.5 migration questions
Well, mountPackage did not work for me either.
Basically, what I want to do is access ALL resources
On Tue, Sep 4, 2012 at 11:17 PM, Alec Swan alecs...@gmail.com wrote:
Well, mountPackage did not work for me either.
Basically, what I want to do is access ALL resources in
com.myco.app.res package with global URL prefix. For example, access
a JavaScript file as global/events.js instead of
28 matches
Mail list logo