Hi,
Thanks igor for your reply.
I think that I will follow your suggestion and I will use the
IComponentResolver.
Cheers,
Ibrahim
On Thu, Nov 26, 2009 at 10:45 PM, Igor Vaynberg wrote:
> nothing wrong with using icomponentresolver,
>
> we already have which is analogous to
> which does our own transformations, so you can take a look at how that
> is implemented. see WicketLinkResolver and WicketTagHandler
>
> -igor
>
>
> On Thu, Nov 26, 2009 at 12:51 PM, ibrahim CHAEHOI wrote:
>> Hi all,
>>
>> I'm working on Jawr, a java library, which handle the bundling and
>> compressing process for web resources. ( https://jawr.dev.java.net/ )
>>
>> I would like to know the best way to integrate Jawr in Wicket.
>> In fact, Jawr generates a custom URL for a specific resource bundle.
>>
>> For example, if you have a reference in your page like:
>>
>>
>>
>> This will generates in production mode something like :
>>
>> > src="/mywebapp/gzip_324521/js/myBundle.js" >
>>
>> and in debug mode :
>>
>>
>>
>>
>>
>> The first way of doing it was to create a dedicated component, which
>> was provided by one of our contributor.
>>
>> So in the wicket page, we had something like:
>>
>> > src="/js/myBundle.js" >
>>
>> And in our page, we have :
>>
>> ...
>> add(new JawrJavascriptReference("bundle1"));
>>
>>
>> This works fine, but I would like to know if there is not an easier
>> way to put it in place.
>> I'm probably biased as I'm much more used to request based frameworks,
>> but I would like to reference my bundle in my html page like :
>>
>>
>>
>>
>>
>>
>> and for image references :
>>
>>
>>
>>
>>
>> To achieve this, I thought to implement a new IComponentResolver, but
>> it seems to be not advised to do so as it's a core functionality of
>> wicket...
>>
>> Another way to do it for Javascript and CSS resources would be to
>> create an IHeaderContributor, which I find cleaner than a
>> webMarkupContainer (no reference need to be define in the HTML page)
>> but I need to have access to the request, and I didn't find a way to
>> retrieve it.
>>
>> So I would like to know, what is the best way to implement it.
>> Any thoughts or advises?
>>
>> Thanks in advance.
>>
>> Cheers,
>> Ibrahim Chaehoi
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>
-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org