Bug 832988 - Minor error in Deleting a Content-Backed Resource example
Minor error in Deleting a Content-Backed Resource example
Status: CLOSED CURRENTRELEASE
Product: JBoss Operations Network
Classification: JBoss
Component: Documentation (Show other bugs)
JON 3.1.0
Unspecified Unspecified
urgent Severity medium
: ---
: JON 3.1.1
Assigned To: Deon Ballard
Mike Foley
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-18 07:05 EDT by Filip Brychta
Modified: 2014-10-23 08:29 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-07-20 12:51:47 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Filip Brychta 2012-06-18 07:05:00 EDT
Original example:

// search for the content resource by name
criteria = new ResourceCriteria();
criteria.addFilterName('updatedApp.ear');
var res = ResourceManager.findResourcesByCriteria(criteria);

ResourceFactoryManager.deleteResource(res.id)  <<< res.id is undefined, res.get(0).id is correct. 

fixed line:
ResourceFactoryManager.deleteResource(res.get(0).id)

Note You need to log in before you can comment on or make changes to this bug.