We would like overide the default operation of the button "remove" on listGrid. We would like update the customer selected (by setting a property "archived = true" in database for example) instead of a hard delete.
We have extended CustomerCareModule,CustomerPresenter, update remove button text, override RemoveClickHandlerRegistration and now we don't know what we should do to achieve what we want.
could you give us some help?
Below our custom CustomerPresenter
Code: Select all
public class MyCustomerPresenter extends CustomerPresenter implements
Instantiable {
protected HandlerRegistration newRemoveClickHandlerRegistration;
@Override
public void bind() {
super.bind();
this.getRemoveClickHandlerRegistration().removeHandler();
newRemoveClickHandlerRegistration = this
.getRemoveClickHandlerRegistration();
newRemoveClickHandlerRegistration = this.getDisplay().getListDisplay()
.getRemoveButton().addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
if (event.isLeftButtonDown()) {
SC.confirm(
"Etes vous sûr de vouloir désactiver ce client ?",
new BooleanCallback() {
@Override
public void execute(Boolean value) {
if (value) {
removeClicked(); // default remove operation
}
}
});
}
}
});
}
Thanks in advance