List<OptionItem> controlActions = new ArrayList<OptionItem>();
OperationManagerLocal operationManager = LookupUtil.getOperationManager();
// do not need to eagerly load the definitions because only name and displayName are needed
for (OperationDefinition action : operationManager.findSupportedResourceTypeOperations(subject, type.getId(),
false)) {
OptionItem actionItem = new OptionItem(action.getDisplayName(), action.getName());
controlActions.add(actionItem);
}
defForm.setControlActions(controlActions);