public void setValue(String name, String key, String[] values) {
try {
OgnlContext ctx = contexts.get(name);
Ognl.setValue(key, ctx, ctx.getRoot(), values.length == 1 ? values[0] : values);
contexts.put(ctx.getRoot(), ctx);
} catch (MethodFailedException e) {
Throwable cause = e.getCause();
if (cause.getClass().isAnnotationPresent(ValidationException.class)) {
throw new ConversionError(cause.getLocalizedMessage());
} else {
throw new InvalidParameterException("unable to parse expression '" + key + '\'', e);
}
} catch (NoSuchPropertyException ex) {
logger.debug("cant find property for expression {} ignoring", key);
logger.trace("Reason:", ex);
} catch (OgnlException e) {
logger.debug("unable to parse expression '{}'. Ignoring.", key);
logger.trace("Reason:", e);
}
}