> Looking for help, I'm trying to copy a property from an indexed value to
> an indexed value. The snippet of code that I'm trying to do this with is:
>
> BeanUtils.copyProperty(toBean, fieldName + "[" + i + "]",
> Array.get(indexedObject, i));
>
> Now looking at the JavaDoc I do see the warning:
> Does not support destination properties that are indexed, but only an
> indexed setter
> (as opposed to an array setter) is available.
>
> This warning is not clear to me, not sure what they are trying to say. I
> do notice in the parameter description it states that the name Property
> name (can be nested/indexed/mapped/combo).
>
> I'm not getting an error, the property is just skipped, the info in the
> log is:
> copyProperty([EMAIL PROTECTED]
> 723c, listValue[0], 1)
> DEBUG [main] (BeanUtils.java:407) - target type for property
> 'listValue' is null, so skipping ths setter
>
> I have the following accessors for the bean in question:
>
> private List listValues;
>
> public List getListValues()
> {
> if(listValues == null)
> {
> listValues = new ArrayList();
> }
> return listValues;
> }
>
> public Object getListValue(int index)
> {
> return getListValues().get(index);
> }
>
> public void setListValues(List list)
> {
> listValues = list;
> }
>
> public void setListValue(int index, Object object)
> {
> getListValues().add(index, object);
> }
>
>
> Am I calling this method incorrectly for an indexed field? Does this
> method not support indexed fields at all???
>
>
> Any help would be greatly appreciated....Thanks
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]