If the base object is a list, attempts to set the value at the
given index with the given value. The index is specified by the
property
argument, and coerced into an integer. If the
coercion could not be performed, an
IllegalArgumentException
is thrown. If the index is
out of bounds, a
PropertyNotFoundException
is thrown.
If the base is a List
, the propertyResolved
property of the ELContext
object must be set to
true
by this resolver, before returning. If this property
is not true
after this method is called, the caller
can safely assume no value was set.
If this resolver was constructed in read-only mode, this method will
always throw PropertyNotWritableException
.
If a List
was created using
java.util.Collections#unmodifiableList, this method must
throw PropertyNotWritableException
. Unfortunately,
there is no Collections API method to detect this. However, an
implementation can create a prototype unmodifiable List
and query its runtime type to see if it matches the runtime type of
the base object as a workaround.