sorry my bad; solved with:

Object[] myvalues= (Object[]) myfield.getValue();
... myvalues[i].toString() ...



 



Gunter D'Hondt <[EMAIL PROTECTED]> 
13/02/2006 11:31
Please respond to
[email protected]


To
[email protected]
cc

Subject
get values from multivaluefield






I'm trying to get the string array from a multivaluefield widget; so 
something like getValues() which returns an Object[] instead of the 
getValue() which returns an Object. Is there a reason why the getValues() 
is not implemented while the setValues() and setValue() is?

MultiValueField myfield = (MultiValueField) myform.getWidget("mywifes");
String[] myvalues = (String[]) myfield.getValue();
--> which doesn't work since casting from Object to String[] gives a 
ClassCastException

Regards,
Gunter D'Hondt


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to