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

Paul Focke paul at outerthought.org
Fri Jun 13 15:28:46 CEST 2008


Here's how to set up a java array in javascript

http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Guide:LiveConnect_Overview:JavaScript_to_Java_Communication#Working_with_Java_Arrays

Paul

On Fri, 2008-06-13 at 15:16 +0200, "Ehms, Jürgen" wrote:
> 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
> 
> _______________________________________________
> daisy community mailing list
> Professional Daisy support: http://outerthought.org/en/services/daisy/support.html
> mail to: daisy at lists.cocoondev.org
> list information: http://lists.cocoondev.org/mailman/listinfo/daisy


More information about the daisy mailing list