THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Code Block |
---|
... new AjaxLink("link") { protected onClick(AjaxRequestTarget target) { ...} @Override protected IAjaxCallDecorator getAjaxCallDecorator() { return new AjaxCallDecorator() { @Override public CharSequence decorateScript(Component c, CharSequence script) { return super.decorateScript(c, "alert('This is my javascript call'); " + script); } }; } } ... |
An alternative approach:
Code Block |
---|
link.add(new AttributeAppender("onclick", new Model("alert('This is my JS script');"), ";")); |
Also see HOWTO do Javascript call after each Wicket AJAX update
Also see Generic Busy Indicator (for both Ajax and non-Ajax submits)