}
}
if ( method != null ) {
if (type.isArray()) {
if (request == null) {
throw new JasperException(Constants.getString(
"jsp.error.beans.setproperty.noindexset",
new Object[] {}));
};
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 {
Object tmpval = null;
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(Constants.getString(
"jsp.error.beans.noproperty",
new Object[] {prop, bean.getClass().getName()}));
} else {
throw new JasperException(Constants.getString(
"jsp.error.beans.nomethod.setproperty",
new Object[] {prop, bean.getClass().getName()}));
}
}
}