BeanUtils getPropertyOfMapBean
Posted
by dx-cp
on Stack Overflow
See other posts from Stack Overflow
or by dx-cp
Published on 2010-06-02T11:01:25Z
Indexed on
2010/06/02
11:03 UTC
Read the original article
Hit count: 202
Hi,
Im wondering if it is possible to get data from property which is map cotaining pairs Key-StringArray (Map) in BeanUtils library. I just simply need to access one of array elements by calling propertyName=string[0]. Current version (1.8.3) does not support indexed properties. If you look into their code you will find in class PropertyUtilsBean in method getPropertyOfMapBean:
if (resolver.isIndexed(propertyName) || resolver.isMapped(propertyName)) { throw new IllegalArgumentException( "Indexed or mapped properties are not supported on" + " objects of type Map: " + propertyName); }
way too bad:-( Have any of you any tip how to do it somehow differently?
© Stack Overflow or respective owner