@SuppressWarnings("unchecked") @Override public void actionPerform(Component component) { if (!hasSubscriptions(ActionPerformedEvent.class)) { if (!(target.getItems() instanceof ContainerDataUnit)) { throw new IllegalStateException("RemoveAction target items is null or does not implement ContainerDataUnit"); } ContainerDataUnit items = (ContainerDataUnit) target.getItems(); CollectionContainer container = items.getContainer(); if (container == null) { throw new IllegalStateException("RemoveAction target is not bound to CollectionContainer"); } removeOperation.removeSelected(target); } else { super.actionPerform(component); } } }