Call JS method after Ajax Load

2015-04-03 Thread Chris
Hi all, I have defined a JS method in the head section of the HTML which is currently called via $(document).ready(method); I also want to call it when certain content is reloaded due to an ajax call triggered by a button click. How can I call the JS method when the button is clicked and the A

Re: Call JS method after Ajax Load

2015-04-03 Thread Sebastien
Hi Chris, target.appendJavaScript should work, but your method is probably on window scope, try window.method(); Also, check on the ajaxdebugwindow if the statement has well been added for execution and it does not indicate an error... Sebastien

Re: Call JS method after Ajax Load

2015-04-03 Thread Sebastien
response.render is also correct if belonging to the component you are re-adding. Idem, the scope is the issue imo On Apr 3, 2015 9:31 PM, "Sebastien" wrote: > Hi Chris, > target.appendJavaScript should work, but your method is probably on window > scope, try window.method(); > Also, check on the

Re: Call JS method after Ajax Load

2015-04-03 Thread Chris
Hi Sebastian, thanks a lot - it basically works but still I have a problem. Intro: I am using a JS library to display tooltips for certain elements in the DOM tree. The problem are tooltips for elements in a div container which is reloaded by Ajax. After reloading the container, the tooltips c

Re: Call JS method after Ajax Load

2015-04-03 Thread Sebastien
Maybe can you run it before ajax is sent (see link#updateAjaxAttribute), its better than using onclick in that case, imo. And then reapply the tooltipbehavior globaly afterhand because detaching element from the tree make them unavailable to jquery anymore, even if you reattach them. If you are usi

Gzipping served resources

2015-04-03 Thread Nick Pratt
Can resources served from Wicket be gzipped by Jetty's GzipFilter? We've added the GzipFilter to a simple Quickstart (in front of the WicketFilter). We can request and receive gzipped files (such as static .css and .js files) served from Jetty's DefaultServlet, and we see that .html files served

Re: Call JS method after Ajax Load

2015-04-03 Thread Nick Pratt
When Wicket is replacing parts of your page via AJAX, you're losing the click handlers - the one's you added on $('#foo') are no longer valid since Wicket just removed and replace the #foo element. On Fri, Apr 3, 2015 at 4:02 PM, Chris wrote: > Hi Sebastian, > > thanks a lot - it basically works

Re: Call JS method after Ajax Load

2015-04-03 Thread Chris
Hi Sebastian with #updateAjaxAttribute it seems working - thanks. But how to add this behavior to the Selectable component, i.e. for the onSelect(AjaxRequestTarget target, List items) method? best regards, Chris > Am 03.04.2015 um 22:34 schrieb Sebastien : > > Maybe can you run it before ajax