public void deleteBean(@Nonnull NamedBean bean,@Nonnull String property) throws java.beans.PropertyVetoException {
  try {
    fireVetoableChange(property,bean,null);
  }
 catch (  java.beans.PropertyVetoException e) {
    throw e;
  }
  if (property.equals("DoDelete")) {
    deregister(bean);
    bean.dispose();
  }
}

public void deleteBean ( @ Nonnull NamedBean bean , @ Nonnull String property ) throws java . beans . PropertyVetoException { try { fireVetoableChange ( property , bean , null ) ; } catch ( java . beans . PropertyVetoException e ) { throw e ; } if ( property . equals ( "DoDelete" ) ) { deregister ( bean ) ; bean . dispose ( ) ; } }
method for a ui to delete a bean , the ui should first request a " candelete " , then if that comes back clear , or the user agrees with the actions , then a " dodelete " can be called which inform the listeners to delete the bean , then it will be deregistered and disposed of .
