Hi all,
I'm trying to use COLLECTION component for a application.
I tested this simple code :
COLLECTION_1.addItem("k1", "l1", 45.75);
COLLECTION_1.addItem("k2", "l2", 11.21);
COLLECTION_1.addItem("k3", "l3", 85.439);
COLLECTION_1.sortByValue();
TEXT_1.setText("NB Elements :"+COLLECTION_1.size());
in local mode everyting is ok.
in Bi platform (with deployment of component);
I have this error in the glf error file
Caused by: org.mozilla.javascript.EcmaError: ReferenceError: "org_scn_community_shared_SortDirection" is not defined. (sortByValue#2)
at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3687)
at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3665)
at org.mozilla.javascript.ScriptRuntime.notFoundError(ScriptRuntime.java:3750)
at org.mozilla.javascript.ScriptRuntime.nameOrFunction(ScriptRuntime.java:1794)
at org.mozilla.javascript.ScriptRuntime.name(ScriptRuntime.java:1733)
at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1552)
at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:815)
at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:109)
at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:394)
at com.sap.ip.bi.zen.rt.framework.jsengine.rhino.CustomContextFactory.doTopCall(CustomContextFactory.java:54)
at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3091)
at org.mozilla.javascript.Context.callFunctionWithContinuations(Context.java:1172)
at org.mozilla.javascript.Context.executeScriptWithContinuations(Context.java:1139)
at com.sap.ip.bi.zen.rt.framework.jsengine.rhino.RhinoJsEngine.doRunScript(RhinoJsEngine.java:60)
... 40 more
When I changed the code by and tested one more time in Bi platform, it's ok
COLLECTION_1.addItem("k1", "l1", 45.75);
COLLECTION_1.addItem("k2", "l2", 11.21);
COLLECTION_1.addItem("k3", "l3", 85.439);
COLLECTION_1..sortByKeyDescending();
TEXT_1.setText("NB Elements :"+COLLECTION_1.size());
I don't understand why the same component have a several behaviour between local and Bi platform.
Thanks indavance for your help.
Julien