Hi, On Fri, Oct 5, 2012 at 12:30 PM, Simon B <simon.bott...@gmail.com> wrote: > Hi, > > I've got a relatively complex jquery filter widget (for a property listings > site) which allows users to filter properties using a number of criteria > (neigbourhood, price range, property type, bedrooms etc). > > The widget works well (at least on the old site) and I want to carry on > using it on the new wicket site. > > I've build the page for property filter list (ListRealtyAdverts) and its > serving up the jquery widget fine using renderHead(HtmlHeaderContainer) to > include the jquery js files and also using TextTemplate interpolation. > > The jquery widget initiates a $.ajax({}) call to the server, which then > returns a text/html response, > > an example of the url of the $.ajax call is: > > http://www.mydomain.com/mls/list-with-filter-ajax-html.jhtml?_=1349428009131&operation_types=rental-standard&address_city=london&price_range=400~GBP~straight$!$1800~GBP~straight&property_types=flat&property_types=house&property_types=town-house&defined_values=images&defined_values=map&address_areas=1&address_areas=2¤t_page=1&order_fields=dateUpdated~desc > > My question is what is the best way to plumb the above call (I can obviously > change the url) so that the text/html is returned by wicket, is there a > special kind of AjaxPageResource or something? > > How do I get the url for the ajax resource? >
If you are always returning HTML then you can just mount a page at some mount path and request with as before. The page will use the passed PageParameters to read the request parameter values and generate the proper HTML. This way you can utilize Wicket components to generate the content (like repeaters for example). You can do the same with app#mountResource("path", new MyResourceReference()) and use a custom resource impl but in this case you will have to generate the HTML with other means (string concatenation, Velocity, FreeMarker, ...) > I'm using Wicket 1.5.8. > > Cheers > > Simon > > > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/wire-legacy-ajax-jquery-widget-to-Wicket-page-tp4652684.html > Sent from the Users forum 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 > -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org