struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mathew, Manoj" <Mathew.Ma...@principal.com>
Subject RE: ArrayList and DynaActionForm--need help very badly
Date Thu, 29 Apr 2004 16:00:13 GMT
that works..

thanks a lot Hubert.

Thank-you,
Manoj Mathew


-----Original Message-----
From: Hubert Rabago [mailto:jakartauser@yahoo.com]
Sent: Thursday, April 29, 2004 10:40 AM
To: Struts Users Mailing List
Subject: RE: ArrayList and DynaActionForm--need help very badly


Try using
<form-property name="friendName" type="java.util.List" />

--- "Mathew, Manoj" <Mathew.Manoj@principal.com> wrote:
> Just one more question guys
> 
> I am trying to implement this and getting this error.
> 
> Cannot assign value of type
> 'org.apache.commons.collections.ListUtils$LazyList' to property
> 'friendName' of type 'java.util.ArrayList']:
> org.apache.commons.beanutils.ConversionException: Cannot assign value of
> type 'org.apache.commons.collections.ListUtils$LazyList' to property
> 'friendName' of type 'java.util.ArrayList'
> 
> my strutsconfig.xml entry
> 
> <form-property name="friendName" type="java.util.ArrayList" />
> 
> my form
> 
> public void reset(ActionMapping mapping, HttpServletRequest request) {
> 		List nameList = ListUtils.lazyList(new ArrayList(), new Factory() {
> 			public Object create() {
> 				return "fakeName";
> 			}
> 		});
> 		set("friendName", nameList);
> 	}
> 
> 
> so type List and Lazylist are not compatible?
> Should i declare the slement also as lazyList?
> In that case how will i acceess thi in my jsp?
> will   friendName[" + i+ "]  work?????
> 
> 
> Thank-you,
> Manoj Mathew
> 



	
		
__________________________________
Do you Yahoo!?
Win a $20,000 Career Makeover at Yahoo! HotJobs  
http://hotjobs.sweepstakes.yahoo.com/careermakeover 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message