mirror of
				https://github.com/Alfresco/alfresco-community-repo.git
				synced 2025-10-29 15:21:53 +00:00 
			
		
		
		
	git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5869 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
		
			
				
	
	
		
			26 lines
		
	
	
		
			792 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			26 lines
		
	
	
		
			792 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| var id = root.id;
 | |
| var name = root.name;
 | |
| logger.log("Name: " + name);
 | |
| var type = root.type;
 | |
| logger.log("ID: " + id + " of type: " + type);
 | |
| var noderef = root.nodeRef;
 | |
| logger.log("NodeRef: " + noderef);
 | |
| var childList = root.children;
 | |
| logger.log("Has " + childList.length + " child nodes");
 | |
| var properties = root.properties;
 | |
| logger.log("Property Count: " + properties.length);
 | |
| var assocs = root.assocs;
 | |
| logger.log("Assoc Count: " + assocs.length);
 | |
| 
 | |
| // test various access mechanisms
 | |
| var childname1 = childList[0].name;
 | |
| var childname2 = childList[0].properties.name
 | |
| var childname3 = childList[0].properties["name"];
 | |
| var childname4 = childList[0].properties["cm:name"];
 | |
| 
 | |
| function result()
 | |
| {
 | |
|    return (childname1 == childname2 && childname2 == childname3 && childname3 == childname4);
 | |
| }
 | |
| result();
 |