Hi, I overrode the IAjaxCallDecorator as below, but it still doesn't work:
there is no action when I click "OK" (although the popup appears). Do I need
to add something else? Thanks,
linkDelete = new AjaxButton("linkDelete") {
@Override
protected IAjaxCallDecorator getAjaxCallDecorator() {
return new AjaxCallDecorator()
{
private static final long
serialVersionUID = 1L;
@Override
public CharSequence
decorateScript(CharSequence script) {
// TODO Auto-generated method
stub
return
super.decorateScript("return confirm('Are you sure you want to
delete the selected record(s)?'); " + script);
}
};
}
@Override
protected void onSubmit(AjaxRequestTarget target,
Form<?> arg1) {
// .... submit logic ...
}
My HTML:
<button type="button" class="dlt" wicket:id="linkDelete"> <images/1c.png>
Delete</button>
--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/How-to-Add-JS-Modifer-to-a-Non-Form-Processing-AjaxButton-tp4657904p4657991.html
Sent from the Users forum mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]