// Send the request to the bean
ContentManagerLocal contentManager = LookupUtil.getContentManager();
try {
contentManager.retrieveBitsFromResource(subject, resource.getId(), selectedInstalledPackage);
} catch (Exception e) {
String errorMessages = ThrowableUtil.getAllMessages(e);
FacesContextUtility.addMessage(FacesMessage.SEVERITY_ERROR,
"Failed to send retrieve content request to the agent. Cause: " + errorMessages);
return "successOrFailure";