}
}
return;
}
} else if (sub instanceof MultiValueField) {
MultiValueField field = (MultiValueField)sub;
Object[] values = null;
if (value instanceof NativeArray) {
NativeArray arr = (NativeArray)value;
Object length = getProperty(arr, "length");
int len = ((Number)length).intValue();
values = new Object[len];
for (int i = 0; i < len; i++) {
Object elemValue = getProperty(arr, i);
values[i] = unwrap(elemValue);
}
} else if (value instanceof Object[]) {
values = (Object[])value;
}
field.setValues(values);
} else {
if (value instanceof Scriptable) {
Scriptable s = (Scriptable)value;
Object[] ids = s.getIds();
ScriptableWidget wid = wrap(sub);