Richard, You lost me a bit with the AbstractAjaxBehaviour stuff. Was this to get wiquery to work or to not use wiquery. The problems I saw with wiquery when I first looked [a few weeks back] at were: 1) seemed a bit of a work-in-progress / proof of concept, 2) lack of samples + a good base of users, 3) how to integrate with the various plugins that are out there.
I just took a second look at the wiquery site and it looks much better then when I first looked. There are now samples with code that actual work and the mailing list is getting more traffic. I still have a concern with integrating the various plugins available for jQuery. I don't want to re-invent the wheel and really don't want to spend time writing java code to get a jQuery plugin to be used with wiQuery. The point of the plugin is to not have to write additional code. How would I integrate the various plugins available into wiQuery? Thanks. -----Original Message----- From: richardwilko [mailto:richardjohnwilkin...@gmail.com] Sent: Wednesday, October 28, 2009 5:57 AM To: users@wicket.apache.org Subject: Re: Wicket and JQuery Hi Jeffery, I would be interested to know what put you off about wiquery, any feedback is always welcome. Anyway, for ajax communication, add an AbstractAajxBehaviour to your page / component, and use the url this generates to pass to your jquery ajax something like this: String callbackurl = ajaxBehaviour.getCallbackUrl(true).toString(). String ajaxJs = "$.get('" + callbackurl +"', function(data){alert('Data Loaded: ' + data);});" When you make an ajax request to this url the onRequest method is called, mine typically look like this: public void onRequest() { final RequestCycle requestCycle = RequestCycle.get(); final PageParameters pageParameters = new PageParameters(requestCycle.getRequest().getParameterMap()); } Using the page parameters object lets you get access to the request parameters easily. If you do not intend to return a result then you should add this line in: RequestCycle.get().setRequestTarget(EmptyRequestTarget.getInstance()); to stop a response being sent. As for ajax replacing of ui components, I usually find that re-running the javascript code to create the ui component works fine. Or another way to get round the problem is to have a element inside the main javascript ui container, and only replace that. Hope this helps Regards - Richard Wilkinson Developer, jWeekend: OO & Java Technologies - Development and Training http://jWeekend.com Jeffrey Schneller wrote: > > I am trying to determine how to use Wicket and JQuery. I would prefer > not using wiQuery or similar. I would like to just include the jQuery > libraries in my html and then use jQuery as javascript and not wrap > everything in java on the server side to generate the client code. > > > > How would one go about doing this? I assume the basic jQuery > functionality is straight forward. However how would you implement > jQuery code that uses Ajax to communicate back to the server using > Wicket on the server? Or would the recommendation be to let Wicket > handle the Ajax communication and only use jQuery for the UI components > such as "Lightbox", "Greybox", apple like sliders, etc. > > > > Any ideas? > > > > Thanks. > > > > > > > ----- http://richard-wilkinson.co.uk My blog: http://richard-wilkinson.co.uk -- View this message in context: http://www.nabble.com/Wicket-and-JQuery-tp26085243p26091993.html Sent from the Wicket - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org