My datatype is String for both MVF.
I would have writen something like :
// this is ok cocoon.request.setAttribute("myForm", form.getWidget()); var reqAttf = cocoon.request.getAttribute("myForm");
Don't know what you are trying here. You simply set a request attribute value and retrieve it? var reqAttf = form.getWidget(); works then also.
var myMVFWidget = reqAttf.lookupWidget("myMVF");
// this does not work and is still a mystery for me (the cats seems to be not allowed in javascript) Array myArray = (Array) myMFVWidget.getValue();
I meant String[] instead of JavaScript's Array. Furthermore you must have in mind that JS is not type save, so there is no cast operator. The code should be something like:
var myStringArray = myMFVWidget.getValue();
for (var i = 0; i < myStringArray.length(); i++) { var value = myStringArray[i]; // do something with it }
Joerg
Hi,
I am trying to get my cforms multipleValueFields. I tried to get the values of the user's selected fields. Thus, I really don't know how to do this since the getValue() of the multiplevaluefield widget return an objetc. This object is an array but I don't know how to cast the object to be an Array an then, retrieve my values ?
Any idea or sample ?
What's your datatype of that field? The object should be an array of that datatype.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]