if(! (getModel() instanceof DeleteRestricted))
{
return deleteNoConfirm();
}
DeleteRestricted objectToDelete = (DeleteRestricted) getModel();
String preDeleteCheckError = objectToDelete.getDeleteConditionError(getClock());
if(preDeleteCheckError.length() > 0)
{
addActionError(preDeleteCheckError);
return ERROR;
}
if(objectToDelete.deleteRequiresConfirmation() && getConfirmDelete().length() == 0)
{
if (getCancelDelete().length() > 0)
return "cancel-delete";
else
return "confirm-delete";