Hi Ömer,
I believe you found a bug in Tapestry, as it seems that JavaScriptSupport
insist on adding JavaScript libraries 'core' stack if any JavaScript module
needs to be imported without checking INCLUDE_CORE_STACK (see
org.apache.tapestry5.internal.services.ajax.JavaScriptSupportImpl#require).
If really need to disable 'core' stack at all, one potential work-around is
to override contribution to JavaScriptStackSource for "core" with a
JavaScriptStack that returns an empty list of libraries (e.g. instance of
ExtensibleJavaScriptStack initialised with an empty configuration). However
if you just want to replace jQuery with your own implementation, you can
contribute it to @Core JavaScriptStack, like this:

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


Best regards,
Cezary


On Thu, Apr 26, 2018 at 9:24 AM, Ömer Genç <oemerg...@gmail.com> wrote:

> Hi Erich,
>
> thanks for your reponse. I already saw that project and it seems very
> promising.
> However the documentation states that tapestry5-jquery is based on tapestry
> 5.3 and i need to use tapestry 5.4.3.
>
> In the meantime is was able to integrate bootstrap4 and jquery-3.X into my
> tapestry application using JavaScriptStacks.
> Everything work quite well. The only problem that still remains is, that i
> cannot remove the jquery comming from tapestry core from my pages.
>
> As far as i understood the documentation of tapestry this should remove the
> core stuff, shouldnt it?
>
> in AppModule
> configuration.add(SymbolConstants.INCLUDE_CORE_STACK, false);
>
> However, this does not seem to work, since this is still added to my pages:
>
> <script src="/assets/meta/z8c546d97/tapestry5/jquery.js"
> type="text/javascript"></script>
>
> Is it possible to remove this?
>
>
>
> 2018-04-25 20:30 GMT+02:00 Erich Gormann <e.gorm...@gormann.de>:
>
> > Hi Ömer,
> >
> > I'm working at the Atos Worldline Company and we developed a component
> > library named "tapestry5-jquery".
> > It provides some features which possibly will help you. Take a look:
> > http://tapestry5-jquery.com/
> >
> > Greetings, Ric
> >
> >
> >
> > Am 25.04.2018 12:42, schrieb Ömer Genç:
> >
> >>   Hey there,
> >>
> >> i am quite new to development with Apache Tapestry.
> >> In Tapestry 5.4.3 support for jquery and bootstrap was added to the core
> >> stack.
> >>
> >> Is it possible to update those dependencies to the latest versions.
> >> I would like to use Bootstrap 4. Bootstrap 4 needs jquery-3.X.
> >>
> >> The version of jquery that comes with the core stack is 1.12.1, which is
> >> outdatet.
> >>
> >> How can i override this with my own version of jquery?
> >>
> >> Furthermore i would like to disable the core stack of tapestry for my
> >> application.
> >>
> >> Setting this configuration in my AppModule class does not seem to work:
> >>
> >> configuration.add(SymbolConstants.INCLUDE_CORE_STACK, false);
> >>
> >> since the tapestry jquery is still added to my site. I can see that from
> >> the Developer Tools of Chrome.
> >>
> >> Any hints on this would be nice.
> >>
> >> Thanks in advance.
> >>
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> > For additional commands, e-mail: users-h...@tapestry.apache.org
> >
> >
>

Reply via email to