I was asked to upgrade one of our existing applications, and I am having a bit of trouble figuring out how to update some of our classes.
We have our own CustomAjaxButton
class which extends AjaxButton
, in which the getAjaxCallDecorator
is overridden so we can return a custom decorateOnSuccessScript
etc.
I found the https://cwiki.apache.org/confluence/display/WICKET/Wicket+Ajax#WicketAjax-o.a.w.ajax.IAjaxCallDecoratorisreplacedwitho.a.w.ajax.attributes.IAjaxCallListener. page which does explains the why, but I am unsure how to combine this with the new AjaxButton
implementation since getAjaxCallDecorator
has been removed.
Code snippet of the old version:
@Override
protected IAjaxCallDecorator getAjaxCallDecorator() {
return new IAjaxCallDecorator()
{
private static final long serialVersionUID = 6L;
...
public CharSequence decorateScript(CharSequence script)
{
return script + " document.getElementById('inputBlocker').style.display='none';";
}
};
}
I have to admit I an quite new at Wicket, and my more experienced colleague is on vacation. Any help\advice is much appreciated.