mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-06-02 17:35:18 +00:00
- Additions to the Alfresco JavaScript data-model . JUnit test for each entry point into Rhino and the ScriptService - tests for various API calls on the Scriptable Node object . More javadoc clean-up in templating and script services git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2726 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
26 lines
798 B
JavaScript
26 lines
798 B
JavaScript
var id = root.id;
|
|
var name = root.name;
|
|
out.println("Name: " + name);
|
|
var type = root.type;
|
|
out.println("ID: " + id + " of type: " + type);
|
|
var noderef = root.nodeRef;
|
|
out.println("NodeRef: " + noderef);
|
|
var childList = root.children;
|
|
out.println("Has " + childList.length + " child nodes");
|
|
var properties = root.properties;
|
|
out.println("Property Count: " + properties.length);
|
|
var assocs = root.assocs;
|
|
out.println("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();
|