commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Niall Pemberton (JIRA)" <>
Subject [jira] Commented: (BEANUTILS-294) BeanUtilsBean.setProperty() does not support nested map
Date Wed, 05 Sep 2007 14:09:33 GMT


Niall Pemberton commented on BEANUTILS-294:

There is a test case for setting a nested mapped property:

So it looks to me like its working OK.

If your initial mapped property [i.e. someMap(x)] returns a null rather than a Map though
this is the behaviour I would expect - and you resolve it by populating the Map before calling
setProperty. If you want your Map's to be automatically created then you might want to look
at using LazyActionForm / LazyDynaBean.

> BeanUtilsBean.setProperty() does not support nested map
> -------------------------------------------------------
>                 Key: BEANUTILS-294
>                 URL:
>             Project: Commons BeanUtils
>          Issue Type: Bug
>          Components: Bean / Property Utils
>    Affects Versions: 1.8.0-BETA
>            Reporter: Stephen Leung
>            Priority: Critical
> I tried to call BeanUtilsBean.setProperty() with a DynaActionForm as the "bean" and "someMap(x)(y)"
as the "name". In BeanUtilsBean.setProperty(), after the while loop at line 900, target became
"null" and name became = "(y)". And consequently IllegalArgumentException is thrown at line
930 when setProperty() tried to getPropertyDescriptor() of a null bean. Specifically, the
following is the stack trace. Could somebody look into it?
> Thanks.
> java.lang.IllegalArgumentException: No bean specified
>      at org.apache.common.beanutils.PropertyUtilsBean.getPropertyDescriptor(
>      at org.apache.commons.beanutils.BeanUtilsBean.setProperty(
>      at org.apache.commons.beanutils.BeanUtilsBean.populate(
>      at org.apache.commons.beanutils.BeanUtils.populate(
>      at org.apache.struts.util.RequestUtils.pouplate(
>     ......

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message