Take a look to web resource optimizer (wro4j) project, hosted on google code.
It's pretty easy to use:

http://code.google.com/p/wro4j/ wro4j 

Alex


Eduardo Nunes wrote:
> 
> I think that I didn't explain it right. What I want is that wicket
> concatenate all included javascripts into one file. Something like
> <wicket:link>
>   <link.. javascript1.js />
>   <link.. javascript2.js />
>   <link.. javascript3.js />
> </wicket:link>
> 
> Generate just one resource with "javacript1.js", "javacript2.js" and
> "javacript3.js" concatenated. The reason for that is to reduce the
> number of requests. I have a project that includes almost 10
> javascripts files and around 7 css files, it would be faster if the
> browser has to download just 2 files, one for all javascript and
> another one for css.
> 
> I can do it with a servlet or something like this, but I want a
> solution that works inside wicket, that i don't have to change my
> source code.
> 
> Probably wicket has a piece of source code responsible for the
> <wicket:head> tag, If I could intercept it and get all included
> javascripts, remove them from the generated html and include my own
> resource with all javascripts concatenated, I would be happy hehehe
> 
> Please ask me if you don't understand, I have to improve my english :(
> 
> Thanks,
> Eduardo S. Nunes
> 
> On Thu, Apr 9, 2009 at 11:42 AM, Craig Tataryn <[email protected]>
> wrote:
>> On Thu, Apr 9, 2009 at 9:06 AM, Eduardo Nunes <[email protected]> wrote:
>>
>>> Hi,
>>>
>>>  Is there a way to tell wicket to package all referenced javascripts
>>> together, the same for the css? If there isn't this solution yet, can
>>> anyone tell me where should I look for to implement it?
>>>
>>
>> You can put your resources, like css and javascript, directly in your
>> packages either under src/main/java or src/main/resources and include
>> them
>> through header inclusions using a ResourceReference
>>
>> Craig.
>>
>>
>>> Thanks,
>>> Eduardo S. Nunes
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [email protected]
>>> For additional commands, e-mail: [email protected]
>>>
>>>
>>
>>
>> --
>> Craig Tataryn
>> site: http://www.basementcoders.com/
>> podcast:http://feeds.feedburner.com/TheBasementCoders
>> irc: ThaDon on freenode #basementcoders, ##wicket, #papernapkin
>> im: [email protected], skype: craig.tataryn
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Package-all-CSS-and-JS-tp22971703p22978723.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