Hi Pieter,

Both Wicket and the libraries which integrate with jQuery UI provide ways
to setup custom JavaScriptResourceReference (JSRR) that loads jquery.js.
The easiest way is to tell the jquery-ui integration library to not
contribute its JSRR at all. Only Wicket will contribute it.

If for some reason you need different version of jquery.js than the one
that comes with Wicket itself then you can use the APIs explained by
Sebastien to use your custom JSRR.
Wicket is smart enough to filter several contributions of the same resource
and actually render it just once.


On Mon, Jan 28, 2013 at 1:35 PM, Pieter Claassen <[email protected]> wrote:

> Sebastien,
>
> So by including the wicket-jquery-ui (if I follow the installation
> instructions), does that not conflict with the jquery core library?
>
> Regards,
> Pieter
>
> On Mon, Jan 28, 2013 at 11:38 AM, Sebastien <[email protected]> wrote:
>
> > Hi Pieter,
> >
> > Yes, wicket is embedding jquery core library. If you include another
> jquery
> > core well yes, you will probably get into troubles.
> >
> > If you really want to do that, you can specify your own jQuery core
> library
> > version, in Wicket Application#init():
> >
> > IJavaScriptLibrarySettings settings = getJavaScriptLibrarySettings();
> > settings.setJQueryReference(new MyJQueryReference());
> >
> > About conflicts with existing Wicket / jQuery UI implementation, that's
> the
> > same, only one jQuery UI library version should be loaded at a time.
> > In wicket-jquery-ui, you can change or remove the shipped library in the
> > same way:
> >
> > IJQueryLibrarySettings settings = new JQueryLibrarySettings();
> >
> > settings.setJQueryReference(new MyJQueryReference()); // (jquery core,
> same
> > code as above)
> > settings.setJQueryUIReference(new
> > JQueryPluginResourceReference(MyApplication.class,
> > "jquery-ui-x.x.x.min.js")); //new jquery ui version
> > or
> > settings.setJQueryUIReference(null) //removes jquery ui library
> >
> > this.setJavaScriptLibrarySettings(settings);
> >
> > Hope this helps,
> > Sebastien.
> >
> > On Mon, Jan 28, 2013 at 10:31 AM, Pieter Claassen <[email protected]
> > >wrote:
> >
> > > Hi Sebastian,
> > >
> > > Thanks. Wicket 6.5 is what I am using.
> > >
> > > As to your question:
> > >
> > > I am referring to the fact that Wicket documentation mentioned that
> > JQuery
> > > has been selected for the internal AJax implementation in Wicket. I
> take
> > > that means that there is a JQuery JS library that ships with
> Wicket-core
> > > and also wicket code that makes use of that library. If I now include
> my
> > > own JQuery library and CSS, is there not a risk that both these
> > libraries,
> > > with mostly the same functions but potentially version skew, could be
> > > loaded by the same page?
> > >
> > > Also, I note that there are a number wicket-jquery projects out there.
> > How
> > > do they play together and not trample the internal Wicket
> implementation.
> > >
> > > Regards,
> > > Pieter
> > >
> > >
> > >
> > > On Mon, Jan 28, 2013 at 10:18 AM, Sebastien <[email protected]> wrote:
> > >
> > > > Hi Pieter
> > > >
> > > > I am not sure to undestand your first point. What libraries are you
> > > > refering to? Internal wicket's library? A jQuery plugin? Another?
> > > >
> > > > About your second point, the ResizeBehavior does not currently
> > implement
> > > > the 'resize' event (which can retrieve size & position).
> > > > To stay consistent with the current logic behind wicket-jquery-ui, I
> > will
> > > > do a ResizePanel which will support such event.
> > > > That's not a big deal, I will look at this tonight...
> > > >
> > > > Are you using Wicket 1.5.x or 6.x?
> > > >
> > > > Thanks & best regards,
> > > > Sebastien.
> > > >
> > > > On Mon, Jan 28, 2013 at 7:45 AM, Pieter Claassen <[email protected]
> >
> > > > wrote:
> > > >
> > > > > This is a general best practice question. I am using
> wicket-jquery-ui
> > > > > because I don't seem to be able to find a resizable panel in the
> > > > > internal wicket ajax widgets.
> > > > >
> > > > > 1. Is there no problem loading new jquery libraries over the wicket
> > > > > implementation? What is best practice?
> > > > > 2. I am looking for a way to get the resized panels' x and y size
> > > > > parameters into my wicket code? Any suggestions how to do this?
> > > > >
> > > > > Thanks,
> > > > > Pieter
> > > > >
> > > > >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: [email protected]
> > > > > For additional commands, e-mail: [email protected]
> > > > >
> > > > >
> > > >
> > >
> > >
> > >
> > > --
> > > - - - - - - - - - - - - - - - - - - - -
> > >   Pieter Claassen
> > >   Musmato B.V.
> > >   e: [email protected]
> > >   t: +31 877 848259
> > >   w: http://musmato.com
> > > - - - - - - - - - - - - - - - - - - - -
> > >
> >
>
>
>
> --
> - - - - - - - - - - - - - - - - - - - -
>   Pieter Claassen
>   Musmato B.V.
>   e: [email protected]
>   t: +31 877 848259
>   w: http://musmato.com
> - - - - - - - - - - - - - - - - - - - -
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com <http://jweekend.com/>

Reply via email to