[daisy] Strangeness with multivalue-fields
Caleb Callaway
caleb at autometrix.com
Mon Apr 2 18:07:50 CDT 2007
Set up a document task with the following Javascript actions:
var document = repository.getDocument(variantKey, true);
document.setField('Product', new Array("X5"));
document.save();
It produces the following error:
org.mozilla.javascript.WrappedException: Wrapped
org.outerj.daisy.repository.DocumentTypeInconsistencyException: The
value for the multivalue-field "Product" should be an array. (#2)
at
org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Context.java:1776)
at
org.mozilla.javascript.MemberBox.invoke(MemberBox.java:191)
at
org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:197)
at
org.mozilla.javascript.Interpreter.interpret(Interpreter.java:3026)
at
org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2164)
at
org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:140
)
at
org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:304)
at
org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:2769)
at
org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2145)
at
org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:140
)
at
org.mozilla.javascript.InterpretedFunction.exec(InterpretedFunction.java:149
)
at
org.outerj.daisy.doctaskrunner.serverimpl.TaskRunner.run(TaskRunner.java:96)
at java.lang.Thread.run(Unknown Source)
Caused by:
org.outerj.daisy.repository.DocumentTypeInconsistencyException: The value
for the multivalue-field "Product" should be an array.
at
org.outerj.daisy.repository.commonimpl.DocumentVariantImpl.checkFieldValue(D
ocumentVariantImpl.java:279)
at
org.outerj.daisy.repository.commonimpl.DocumentVariantImpl.setField(Document
VariantImpl.java:226)
at
org.outerj.daisy.repository.commonimpl.DocumentVariantImpl.setField(Document
VariantImpl.java:199)
at
org.outerj.daisy.repository.commonimpl.DocumentImpl.setField(DocumentImpl.ja
va:174)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown
Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
org.mozilla.javascript.MemberBox.invoke(MemberBox.java:174)
... 11 more
I can't find any relevant messages in the log files, and the value for the
multivalue-field "Product" jolly well is an array. What gives?
Thanks,
Caleb
More information about the daisy
mailing list