Re: JQuery - best practice

2013-02-02 Thread Sebastien
Hi Martin, Thank you so much! Then, I guess I am ready... All is located here (and sorry for the long preamble): https://github.com/sebfz1/wicket-jquery-ui/issues/17 Thanks best regards, Sebastien. On Thu, Jan 31, 2013 at 12:28 AM, Martin Grigorov mgrigo...@apache.orgwrote: Sebastien,

Re: JQuery - best practice

2013-02-02 Thread Martin Grigorov
Hi Sebastien, I'll take a look at it soon. On Sat, Feb 2, 2013 at 2:59 PM, Sebastien seb...@gmail.com wrote: Hi Martin, Thank you so much! Then, I guess I am ready... All is located here (and sorry for the long preamble): https://github.com/sebfz1/wicket-jquery-ui/issues/17 Thanks

Re: JQuery - best practice

2013-01-30 Thread Pieter Claassen
Ernesto/Sebastien, I am stuck :-( Firstly, thanks for the resizablePanel in wicket-jquery-ui, but I have to hold off until this code is implemented in a behavior since my inheritance doesn't match your project (I cannot inherit from resizablePanel). I looked at what was available in wiquery and

Re: JQuery - best practice

2013-01-30 Thread Ernesto Reinaldo Barreiro
Pieter, Look at this example. http://antiliasoft.com/wiquery-plugins/?wicket:bookmarkablePage=:com.wiquery.plugins.demo.ResizablePage and click on the ? at the left corner/. It is exactly what you want... Wiquery already have a ResizableAjaxBehavior that hooks into stopEvent. Fell free to copy

Re: JQuery - best practice

2013-01-30 Thread Pieter Claassen
Ernesto, I cannot find any code in wiquery-6.2.0. that hooks into the stopEvent. The example you provided seems to still force a round trip on any change, not just on stopEvent. Maybe I am daft, but I don't see any code that does this? I assume one can extend ResizableBehaviour and add the

Re: JQuery - best practice

2013-01-30 Thread Pieter Claassen
Ok, I just implemented my own. Seems to work. In my code MyResizableBehavior resizableBehavior = new MyResizableBehavior(); resizableBehavior.setStopEvent(new MyResizableBehavior.AjaxResizeStopCallback() { @Override protected void resize(AjaxRequestTarget

Re: JQuery - best practice

2013-01-30 Thread Ernesto Reinaldo Barreiro
Hi, On Wed, Jan 30, 2013 at 3:15 PM, Pieter Claassen pie...@musmato.com wrote: Ernesto, I cannot find any code in wiquery-6.2.0. that hooks into the stopEvent. The example you provided seems to still force a round trip on any change, not just on stopEvent. Maybe I am daft, but I don't see

Re: JQuery - best practice

2013-01-30 Thread Ernesto Reinaldo Barreiro
Good that you where able to solve your problem! On Wed, Jan 30, 2013 at 3:53 PM, Pieter Claassen pie...@musmato.com wrote: Ok, I just implemented my own. Seems to work. In my code MyResizableBehavior resizableBehavior = new MyResizableBehavior();

Re: JQuery - best practice

2013-01-30 Thread Sebastien
Hi, @Pieter, Yes, a Panel was definitely not the best idea, it would have been better to have - for the moment at least - a WebMarkupContainer as I planned as the beginning. I did a try on Martin's and Ernesto's suggestion(s) (handling callbacks in behaviors, in addition to a Listener/Adapter). I

Re: JQuery - best practice

2013-01-30 Thread Martin Grigorov
Sebastien, I'll be glad to help you if I can! Just let me know when you are ready. On Wed, Jan 30, 2013 at 9:19 PM, Sebastien seb...@gmail.com wrote: Hi, @Pieter, Yes, a Panel was definitely not the best idea, it would have been better to have - for the moment at least - a

Re: JQuery - best practice

2013-01-29 Thread Sebastien
Hi Ernesto, Hi Martin, IMHO, it would make more sense to have that feature as a behavior instead of a panel... that way you are not forcing an inheritance For this point, I was not sure whether to make a WebMarkupContainer or a Panel that, you are true, force the inheritance. But actually the

Re: JQuery - best practice

2013-01-29 Thread Martin Grigorov
Hi Sebastien, I think the more flexible way is to have the callbacks in the behavior: class ResizeableBehavior extends JQueryAjaxBehavior { protected void onAjax(AjaxRequestTarget target) { int top, left, width, height = ...; // use the request parameters to extract the values

Re: JQuery - best practice

2013-01-29 Thread Ernesto Reinaldo Barreiro
Hi, On Tue, Jan 29, 2013 at 10:26 AM, Sebastien seb...@gmail.com wrote: Hi Ernesto, Hi Martin, IMHO, it would make more sense to have that feature as a behavior instead of a panel... that way you are not forcing an inheritance For this point, I was not sure whether to make a

Re: JQuery - best practice

2013-01-29 Thread Sebastien
Hi Ernesto, Hi Martin, Thank you very much for your inputs!! Then, I agree on the architecture, and will generalize this, as part of the upgrade to jQuery UI 1.10. @Ernesto, glad to read you like the demo app! :) I would like to redesign it in a little bit more sexy way, but I don't do what I

Re: JQuery - best practice

2013-01-29 Thread Ernesto Reinaldo Barreiro
Hi, On Tue, Jan 29, 2013 at 1:16 PM, Sebastien seb...@gmail.com wrote: Hi Ernesto, Hi Martin, Thank you very much for your inputs!! Then, I agree on the architecture, and will generalize this, as part of the upgrade to jQuery UI 1.10. @Ernesto, glad to read you like the demo app! :) I

Re: JQuery - best practice

2013-01-28 Thread Sebastien
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

Re: JQuery - best practice

2013-01-28 Thread Pieter Claassen
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

Re: JQuery - best practice

2013-01-28 Thread Sebastien
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 =

Re: JQuery - best practice

2013-01-28 Thread Pieter Claassen
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 seb...@gmail.com wrote: Hi Pieter, Yes, wicket is embedding jquery core library. If

Re: JQuery - best practice

2013-01-28 Thread Martin Grigorov
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

Re: JQuery - best practice

2013-01-28 Thread Sebastien
Hi Pieter, hi Martin, As you are using wicket 6 and wicket-jquery-ui 6, there is no version conflict because wicket-jquery-ui relies on wicket's embedded jquery core, so there is only one reference of jquery-js But a problem may arise: - if you are youself using a version of jquery core

Re: JQuery - best practice

2013-01-28 Thread Sebastien
Hi Pieter, I added the ResizablePanel component and deployed the snapshot release (wicket-jquery-ui-core-6.2.1-SNAPSHOT) You may find how it works on the demo site: http://www.7thweb.net/wicket-jquery-ui/resizable/ResizablePanelPage I hope it will suit your use case, do not hesitate to come

Re: JQuery - best practice

2013-01-28 Thread Ernesto Reinaldo Barreiro
Hi, On Tue, Jan 29, 2013 at 12:38 AM, Sebastien seb...@gmail.com wrote: Hi Pieter, I added the ResizablePanel component and deployed the snapshot release (wicket-jquery-ui-core-6.2.1-SNAPSHOT) You may find how it works on the demo site:

Re: JQuery - best practice

2013-01-28 Thread Martin Grigorov
On Tue, Jan 29, 2013 at 7:31 AM, Ernesto Reinaldo Barreiro reier...@gmail.com wrote: Hi, On Tue, Jan 29, 2013 at 12:38 AM, Sebastien seb...@gmail.com wrote: Hi Pieter, I added the ResizablePanel component and deployed the snapshot release (wicket-jquery-ui-core-6.2.1-SNAPSHOT)

Re: JQuery - best practice

2013-01-28 Thread Ernesto Reinaldo Barreiro
Hi, On Tue, Jan 29, 2013 at 7:55 AM, Martin Grigorov mgrigo...@apache.orgwrote: On Tue, Jan 29, 2013 at 7:31 AM, Ernesto Reinaldo Barreiro reier...@gmail.com wrote: Hi, On Tue, Jan 29, 2013 at 12:38 AM, Sebastien seb...@gmail.com wrote: Hi Pieter, I added the ResizablePanel

Re: JQuery - best practice

2013-01-28 Thread Ernesto Reinaldo Barreiro
HI On Tue, Jan 29, 2013 at 8:05 AM, Ernesto Reinaldo Barreiro reier...@gmail.com wrote: Hi, On Tue, Jan 29, 2013 at 7:55 AM, Martin Grigorov mgrigo...@apache.orgwrote: On Tue, Jan 29, 2013 at 7:31 AM, Ernesto Reinaldo Barreiro reier...@gmail.com wrote: Hi, On Tue, Jan 29, 2013 at

JQuery - best practice

2013-01-27 Thread Pieter Claassen
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

Re: JQuery - best practice

2013-01-27 Thread Ernesto Reinaldo Barreiro
Hi, On Mon, Jan 28, 2013 at 7:45 AM, Pieter Claassen pie...@musmato.com 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