You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by bu...@apache.org on 2003/01/17 15:49:27 UTC
DO NOT REPLY [Bug 16206] New: -
BeanUtils.copyProperties fails with indexed getter for List -> ArrayList
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16206>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16206
BeanUtils.copyProperties fails with indexed getter for List -> ArrayList
Summary: BeanUtils.copyProperties fails with indexed getter for
List -> ArrayList
Product: Commons
Version: 1.6 Final
Platform: Other
OS/Version: Other
Status: NEW
Severity: Normal
Priority: Other
Component: Bean Utilities
AssignedTo: commons-dev@jakarta.apache.org
ReportedBy: matt@raibledesigns.com
I am using BeanUtils.copyProperties to copy a POJO to a Struts Action Form. The
POJO has a number of List properties for children of the object. I am able to
copy all properties successfully from the POJO to the ActionForm where there are
ArrayList properties for the children. I am doing this using ConvertUtils and
my own ListConverter. You can find the code for my convert method in my
ListConverter at http://tinyurl.com/4j4g if you're interested.
Like I said, everything was working fine, until I added indexed properties into
the mix today. Now none of my lists are copied using BeanUtils.copyProperties().
I have getPropertyList() and setPropertyList(ArrayList list) on my form. I also
have getPropertyList(int index) and setPropertyList(int index, ActionForm form).
If I remove the indexed *getters* - everything works as expected. This works
good enough for me, but I wanted to make sure this was "as designed."
The version of commons-beanutils.jar that I'm using is from struts 1.1b3 (1.6-dev).
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>