Date: 2005-01-27T17:50:03 Editor: NiallPemberton Wiki: Apache Struts Wiki Page: StrutsCatalogLazyList URL: http://wiki.apache.org/struts/StrutsCatalogLazyList
no comment Change Log: ------------------------------------------------------------------------------ @@ -54,6 +54,29 @@ The following sections show three examples of how to achieve lazy list processing. +=== BeanUtils Indexed Properties Issue === + +There is an issue in [http://jakarta.apache.org/commons/beanutils/ Commons BeanUtils] with indexed properties if you use java.util.List rather than Arrays. Full details +about the issue are in [http://issues.apache.org/bugzilla/show_bug.cgi?id=28358 Bug 28358]. + +If you define the following types of getter/setter methods for your indexed property, in JDK 1.3 you shouldn't have any problem, but in JDK 1.4 the getter/setter which use the java.util.List are ignored by Bean Utils. + +{{{ + public SkillBean getSkills(int index) + public List getSkills() + public void setSkills(int index, SkillBean skill) + public void setSkills(List skills) +}}} + + +The solution is either to use DynaBeans which don't have any issues or use method signatures with Arrays rather than java.util.List. For example the following should work... + +{{{ + public SkillBean getSkills(int index) + public SkillBean[] getSkills() + public void setSkills(int index, SkillBean skill) + public void setSkills(SkillBean[] skills) +}}} === Hand Cranking lazy List in the ActionForm === --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]