for (Class<? extends Action> actionType : actions) {
Action action = actionManager.getAction(actionType);
if (action instanceof MultipleObjectsAction) {
MultipleObjectsAction multiObjectAction = (MultipleObjectsAction) action;
multiObjectAction.setEnabled(numSelected > 0);
((CayenneAction) multiObjectAction).setName(multiObjectAction
.getActionName(numSelected > 1));
}
}
}