You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Matías Giovannini <ma...@k-bell.com> on 2002/12/13 21:05:06 UTC

[Validator] Indexed properties?

Hello,

I'm trying to use a hand-built FormSet to validate some indexed 
properties. I can rely in general on the ValidatorResults object to 
hold for me the converted values; but for indexed properties the 
generated keys make those values lie all over the place (technically 
speaking, the index now makes part of the key) and I can't retrieve 
them anymore.

Also, the field key generated includes the property, for instance 
"indexedProp[3].subProp", which is not really appropriate if the 
underlying object is an array of "non-strutctured" objects (Integer's, 
Date's, whatever).

Ideally, I would want to be able to do:

Object[] array = (Object[]) results.getResultValueMap().get("name");

Is there any way to coerce Validator to do this for me?

TIA,
Matías.