Files
.externalToolBuilders
config
source
cpp
java
org
alfresco
example
filesys
jcr
model
repo
action
admin
attributes
audit
avm
cache
clt
coci
configuration
content
copy
descriptor
dictionary
domain
exporter
forum
importer
jscript
AVM.java
AVMNode.java
Actions.java
Association.java
BaseScopableScriptImplementation.java
BaseScriptImplementation.java
Behaviour.java
CategoryNode.java
CategoryTemplateNode.java
ChildAssociation.java
Classification.java
ClasspathScriptLocation.java
CrossRepositoryCopy.java
ExecuteScriptJob.java
Node.java
People.java
RhinoScriptService.java
RhinoScriptTest.java
Scopeable.java
ScriptAction.java
ScriptBehaviour.java
ScriptBehaviourTest.java
ScriptLogger.java
ScriptUtils.java
ScriptableHashMap.java
ScriptableQNameMap.java
Search.java
Session.java
ValueConverter.java
test-context.xml
test_onAddAspect_cmCountable.js
test_onCreateChildAssociation.js
test_onCreateNode_cmContent.js
test_script1.js
test_script2.js
test_script3.js
lock
model
module
node
ownable
policy
remote
rule
search
security
service
template
transaction
version
workflow
service
tools
util
apache
ehcache.xml
hibernate.cfg.xml
queryRegister.dtd
test-resources
web
.classpath
.project
build.xml
alfresco-community-repo/source/java/org/alfresco/repo/jscript/test_script1.js
Kevin Roast 2b251c922b . Checkpoint for the Rhino JavaScript engine integration:
- 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
2006-04-28 10:56:48 +00:00

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();