Hi all,

I've used the source code from Fracois Rey and have patched the
PropertyUtils and BeanUtils to support string indexed properties.

e.g. property prop(id) gets translated into getProp("id") and setProp("id",
value)

It works in combination with integer indexed and nested properties.
It will probably not work correctly, if the index strings contain
the separator characters ".", "[", "]" or "(", ")".

I have not done any unit tests yet, I've only tested it in my
Struts based application.


I have no idea how to sumbit code to Jakarta, so I send the sources as they
are
to this mailing list. If you'd like the idea, I will clean them up, test
them etc.

Possible improvements might be:
 - escape syntax which would allow separator characters in the index string
 - allow using Map, if there are no getProp(String) and setProp(String, ...)
   but there is Map getProp();

--
gR

beanutils-with-string-keyed-properties.zip

Reply via email to