Date: 2005-02-21T03:14:43
Editor: FrankDean
Wiki: Apache Struts Wiki
Page: StrutsCatalogLazyList
URL: http://wiki.apache.org/struts/StrutsCatalogLazyList
Updated to reflect Commons-Collections 2.1.1 behaviour
Change Log:
------------------------------------------------------------------------------
@@ -149,6 +149,36 @@
}}}
+
+The syntax in Commons-Collections 2.1.1 is;
+
+{{{
+
+ import org.apache.commons.collections.Factory;
+ import org.apache.commons.collections.ListUtils;
+
+ public class SkillActionForm extends ActionForm, implements Factory {
+
+ protected List skills = ListUtils.lazyList(new ArrayList(), this);
+
+ public List getSkills() {
+ return skills;
+ }
+
+ public void setSkills(final List newSkills) {
+ skills = ListUtils.lazyList(newSkills, this);
+ }
+
+ // 'Factory' method for LazyList
+ public Object create() {
+ return new SkillBean();
+ }
+
+ }
+
+}}}
+
+
=== LazyDynaBean / LazyValidatorForm ===
'''N.B.''' Solutions here require '''Struts 1.2.4''' and '''Bean Utils 1.7.0'''
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]