}
}
if (method != null) {
if (type.isArray()) {
if (request == null) {
throw new JasperException(
Localizer.getMessage("jsp.error.beans.setproperty.noindexset"));
}
Class t = type.getComponentType();
String[] values = request.getParameterValues(param);
//XXX Please check.
if (values == null) return;
if (t.equals(String.class)) {
method.invoke(bean, new Object[]{values});
} else {
createTypedArray(prop, bean, method, values, t,
propertyEditorClass);
}
} else {
if (value == null || (param != null && value.equals(""))) return;
Object oval = convert(prop, value, type, propertyEditorClass);
if (oval != null)
method.invoke(bean, new Object[]{oval});
}
}
} catch (Exception ex) {
throw new JasperException(ex);
}
if (!ignoreMethodNF && (method == null)) {
if (type == null) {
throw new JasperException(
Localizer.getMessage("jsp.error.beans.noproperty",
prop,
bean.getClass().getName()));
} else {
throw new JasperException(
Localizer.getMessage("jsp.error.beans.nomethod.setproperty",
prop,
type.getName(),
bean.getClass().getName()));
}