I'm not sure how it would break anything to just include it although I can
see issues with the themes.
My concern is to get the DateField component to work I created a custom
JQuery UI download and included it. If everyone that wants to add some
jQuery component does this there will be lots of duplicate code.
I created a mixin called ui/widget for the tapestry5-jquery library. Since
it included jQuery UI you could just extend it with your widget name, add
the javascript to your project and it just worked. No need for java code or
understanding how the tapestry javascript API works. With the data- api it
should be even better. Here is an example of a jquery slider mixin. All the
mixin needs to do is include the javascript.
@ImportJQueryUI(value = {"jquery.ui.widget", "jquery.ui.mouse",
"jquery.ui.slider"})
public class Slider extends Widget {}
Perhaps it's time for a tapestry-jqueryUI module.
Post by Magnus Kvalheimdefine(["t5/core/dom", "t5/core/events", "jquery", "//
code.jquery.com/ui/1.10.3/jquery-ui.js"],
...
That's interesting - loading of scripts directly within a define. Seems
very useful and convenient.
Thought I might use same approach in some scenarios.
I tried to lookup on documentation of that to see use cases, but seems like
requirejs officially describes the paths and shim configurations as ways to
load non AMD modules.
(In my still limited knowledge)
A heads up though.
Looks like requirejs does not guarantee execution order for non AMD
scripts. So according to some sources there is a chance that jqueryui may
execute before jquery in this case.
http://iamnotmyself.com/2012/09/07/getting-started-managing-client-side-scripts-with-require-js/
Also I wonder what would happen if there were more modules that depended on
the same jqueryui script..? Would it load multiple times?
thoughts?
Post by Lenny PrimakI tried to do exactly what you are trying to do and that's what
precipitated the discussion about JQuery and Bootstrap from CDN.
https://code.google.com/p/flowlogix/source/browse/tapestry-services/src/main/resources/META-INF/modules/flowlogix/HighlightEffect.js?name=tapestry-5.4
Post by Lenny PrimakIt requires JQueryUI and I just load it from CDN and it works perfectly.
Post by Barry BooksWhen I created the datapicker I also needed the JQuery UI library but
it
Post by Lenny PrimakPost by Barry Booksdoes not appear to be an option in the Tapestry Core. I think many
jquery
Post by Lenny PrimakPost by Barry Bookscomponents may need this and without it in the core many modules will
each
Post by Barry Booksend up with their own version. Is there any reason this is not
included?
Post by Lenny Primak---------------------------------------------------------------------