Hi,

I've reworked it as Michael suggested - DynamicJQueryResourceReference.
Additionally I added caching of the calculated name in the request cycle's
metadata, so the name is calculated at most once per request.
It will be added only to master branch (7.x) until someone asks to downport
it to 6.x.


On Tue, May 28, 2013 at 8:36 AM, Michael Haitz <[email protected]>wrote:

> Hi,
>
> why not adding a second JQueryResourceReference? Then you can use the
> dynamic one or not (without a new setting).
>
> getJavaScriptLibrarySettings().setJQueryReference(new
> DynamicJQueryResourceReference());
>
> cheers,
> Michael
>
> Am 27.05.2013 um 23:32 schrieb Sebastien <[email protected]>
> :
>
> > Hi Martin,
> >
> > About the dynamic calculation, can't it be made according to an
> > IApplicationSettings or an IJavaScriptLibrarySettings flag? Maybe could
> > this flag be false by default and the user may set it to true it if its
> > application needs to be used by IE6/7/8?
> >
> > Thanks & best regards,
> > Sebastien
> >
> >
> > On Mon, May 27, 2013 at 11:20 PM, Martin Grigorov <[email protected]
> >wrote:
> >
> >> Hi,
> >>
> >> At https://issues.apache.org/jira/browse/WICKET-5208 you may see a
> simple
> >> patch that makes JQueryResourceReference more dynamic.
> >> With this change Wicket can deliver jQuery 2.x to modern browsers and
> >> jQuery 1.x for IE 6/7/8.
> >>
> >> Pros: smaller jQuery
> >> Cons: dynamic calculation by using the user agent to make the decision.
> >>
> >> Do you think this is useful/problematic ?
> >>
> >> The user application still can set its own ResourceReference with jQuery
> >> version that it prefers.
> >>
>
>

Reply via email to