[daisy] How To set a multivalue-field in documenttask

"Ehms, Jürgen" jge at msc-ge.com
Fri Jun 13 15:16:54 CEST 2008


I like to change am multivaluevield in documenttask.


var document = repository.getDocument(variantKey, true);
document.setField('newscategory', ['template']);
document.save();

I get this error:

org.mozilla.javascript.WrappedException: Wrapped org.outerj.daisy.repository.DocumentTypeInconsistencyException: The value for the multivalue-field "newscategory" should be an array. (#2)
	at org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Context.java:1693)
	at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:160)
	... more

How is to set up a java array in this task ??

Thanks for help

Juergen

MSC Vertriebs GmbH
registered office : Stutensee
Jurisdiction and registered Mannheim, Germany, HRB No. 10 3631
Managing Director: Manfred Schwarztrauber, Lothar Kümmerlin, Rüdiger Kuhn

Gleichmann & Co. Electronics GmbH
registered office : Frankenthal
Jurisdiction and registered Ludwigshafen, Germany, HRB No. 21305
Managing Director: Manfred Schwarztrauber, Thomas Klein



More information about the daisy mailing list