Actually you don't have to access the resources. The wro filter  just handles
the request for static resources, there no wicket specific integration. All
you have to do, is to define the location of your resources in wro.xml
(group descriptor). The location of resources can be virtually anything:
external url, relative to servlet context, classpath or file resources
(http://code.google.com/p/wro4j/wiki/ResourceTypes). 

I pretty sure there is no way to 'ask' wicket to gzip and minimize external
resources, because wicket doesn't control them.

Alex 


AppleGrew wrote:
> 
> Checked it out. This is good, but I am not sure how to integrate this with
> Wicket. Currently it seems that WRO's url is being override by
> WicketFilter,
> so I am not being able to access WRO resources.
> 
> BTW going back to original problem. I tired to debug the Wicket code and
> it
> seems for shared resources the SharedResourceRequestTraget simply invokes
> PackageResource, while for non globally shared resources
> JavascriptPackageResource is invoked. JavascriptPackageResource  seems to
> be
> responsible for gzipping and minizing JS code. Not sure how do I 'ask'
> Wicket to do the same for globally resources.
> 
> Regards,
> Apple Grew
> my blog @ http://blog.applegrew.com/
> 
> 
> On Wed, Apr 7, 2010 at 8:20 PM, Alex Objelean
> <[email protected]>wrote:
> 
>>
>> You could take a look at wro4j: http://code.google.com/p/wro4j/ . It
>> helps
>> you keep you javascripts (and css) organized in a single location, merge
>> and
>> minimize them. It is also very easy configurable
>> (http://code.google.com/p/wro4j/wiki/GettingStarted) and extensible
>> (allow
>> provide your own implementation of js or css minification algorithm).
>> Also
>> it provides a maven plugin (
>> http://code.google.com/p/wro4j/wiki/MavenPlugin)
>> for build time merging and minification. You can see a complete list of
>> features here: http://code.google.com/p/wro4j/wiki/Features
>>
>> Alex
>>
>>
>> AppleGrew wrote:
>> >
>> > Hi All,
>> >
>> > I have put all my JS files in WEB-INF. To let Wicket find them I have
>> > created my own ResourceStreamLocator. The locator on getting class
>> scope
>> > as
>> > Application simply locates the JS files from 'WEB-INF/js'. The problem
>> is
>> > how do I enable Wicket's built-in Javascript compression?
>> >
>> > I tried the following code with a form:-
>> >
>> add(JavascriptPackageResource.getHeaderContribution(ApplicationCore.class,
>> > "js/form.js"));
>> >
>> > I can still see the white spaces in the JS code when I try to access
>> them
>> > from my browser. Pls guide.
>> >
>> > Regards,
>> > Apple Grew
>> > my blog @ http://blog.applegrew.com/
>> >
>> >
>>
>> --
>> View this message in context:
>> http://old.nabble.com/Javascript-Compression-not-working.-tp28164115p28166133.html
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>>
>>
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Javascript-Compression-not-working.-tp28164115p28167755.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to