Hi,

you can override the jquery version by contributing an override for
"jquery-library" in the JavaScriptStack.

We're using our own jQueryUI without tapestry-jquery by contributing
JavaScriptModuleConfigurations to the ModuleManager.

I've created a
https://gist.github.com/benweidig/90547102c7dc4dc233485fbfcd1ca5da for
better code readability but here's the code:

@Core
@Contribute(JavaScriptStack.class)
public static void overrideJquery(OrderedConfiguration<StackExtension>
conf) {
    conf.override("jquery-library",
StackExtension.library("classpath:META-INF/assets/jquery/jquery-3.3.1.min.js"));
}

@Contribute(ModuleManager.class)
public static void contributeModuleManager(MappedConfiguration<String,
JavaScriptModuleConfiguration> conf,
                                           @Inject
@Symbol(SymbolConstants.PRODUCTION_MODE) boolean productionMode,
                                           AssetSource assetSource) {

    final String path = "META-INF/assets/jquery-ui-1.10.3/min/";

    Resource coreResource = assetSource.getClasspathAsset(path +
"jquery.ui.core.min.js");
    JavaScriptModuleConfiguration core = new
JavaScriptModuleConfiguration(coreResources).dependsOn("jquery");
    conf.add("jquery.ui.core", core);

    Resource datepickerResource = assetSource.getClasspathAsset(path +
"jquery.ui.datepicker.min.js");
    JavaScriptModuleConfiguration datepicker = new
JavaScriptModuleConfiguration(datepickerResource).dependsOn("jquery.ui.core");
    conf.add("jquery.ui.datepicker", datepicker);

    ...
}

Hope this helps.

Ben

On Thu, May 10, 2018 at 10:34 AM Erich Gormann <e.gorm...@gormann.de> wrote:

> Dear all,
>
> I'm using Tapestry 5.4.3 and the latest release version of
> tapestry5-jquery in our application.
>
> Can you give me a hint, how to force Tapestry to use another version of
> jQuery and/or jQuery UI than the one bundled in libraries?
>
> Thanks for your suggestions. I heard, that this should be possible, but
> was not able to find this in the documentation.
>
> Regrads, Ric
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>

-- 

Ben Weidig
Netzgut GmbH

Reply via email to