cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Derek Hohls" <DHo...@csir.co.za>
Subject Initializing a multivaluefield?
Date Thu, 14 Jun 2007 10:28:20 GMT
Hi
 
I am struggling to initialize the selected values for a 
multivaluefield.
 
In the flowscript I have the usual:
var model = myForm.getModel()
 
and for a simple text field I have something like:
model.myTextField = "foobar";
 
but when I try and set an array of values for the initial 
multivaluefield selection, I cannot seem to find the 
correct syntax e.g.
 
model.myMultivalueField[0] = "foo";
model.myMultivalueField[1] = "bar";
 
gives a null pointer error?
and 
 
model.myMultivalueField.push( "foo" );
 
gives a syntax error.
 
There is obviously a simple way to do this - please
help!
 
Thanks
Derek
 
P.S. I am not using Hibernate or any POJOs - just working
in POJ (Plain 'ol Javascript).

-- 
This message is subject to the CSIR's copyright, terms and conditions and
e-mail legal notice. Views expressed herein do not necessarily represent the
views of the CSIR.
 
CSIR E-mail Legal Notice
http://mail.csir.co.za/CSIR_eMail_Legal_Notice.html 
 
CSIR Copyright, Terms and Conditions
http://mail.csir.co.za/CSIR_Copyright.html 
 
For electronic copies of the CSIR Copyright, Terms and Conditions and the CSIR
Legal Notice send a blank message with REQUEST LEGAL in the subject line to
CallCentre@csir.co.za.


This message has been scanned for viruses and dangerous content by MailScanner, 
and is believed to be clean.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message