. Fix to Alfresco JavaScript to correctly convert back multi-value list properties that have not been modified

. Change to use of Wrapper interface when returning Java values from JavaScript
. Addition of final 1.4 icons from Linton for Dashboard and User Options screens

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@3492 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Kevin Roast
2006-08-14 10:56:18 +00:00
parent 40286bdad8
commit 50ab6661c4
2 changed files with 38 additions and 27 deletions

View File

@@ -37,9 +37,9 @@ import org.alfresco.service.cmr.repository.TemplateImageResolver;
import org.alfresco.service.namespace.QName;
import org.apache.log4j.Logger;
import org.mozilla.javascript.Context;
import org.mozilla.javascript.NativeJavaObject;
import org.mozilla.javascript.Scriptable;
import org.mozilla.javascript.ScriptableObject;
import org.mozilla.javascript.Wrapper;
/**
* Implementation of the ScriptService using the Rhino JavaScript engine.
@@ -250,9 +250,9 @@ public class RhinoScriptService implements ScriptService
Object result = cx.evaluateReader(scope, reader, "AlfrescoScript", 1, null);
// extract java object result if wrapped by rhinoscript
if (result != null && result instanceof NativeJavaObject)
if (result instanceof Wrapper)
{
result = Context.jsToJava(result, Object.class);
result = ((Wrapper)result).unwrap();
}
return result;