@SuppressWarnings("unchecked")
public void setValue(ELContext context, Object base, Object property, Object value)
throws NullPointerException, PropertyNotFoundException, PropertyNotWritableException, ELException {
if (context == null) {
throw new NullPointerException();
}
if (base instanceof ListModel<?>) {
ListModel<?> listmodel = (ListModel<?>) base;
Integer idx = coerce(property);
if (idx == null) {
return;
}
context.setPropertyResolved(true);
if (idx >= 0 && idx < listmodel.getSize()) {
if (base instanceof ListModelArray) {
((ListModelArray<Object>) base).set(idx, value);
} else if (base instanceof ListModelList<?>) {
((ListModelList<Object>) base).set(idx, value);
} else {
throw new PropertyNotWritableException(
"can't write property " + property + " to ListModel:" + base);
}
} else {
}
}
}