commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hardy, Derek" <Derek.Ha...@astrazeneca.com>
Subject [beanUtils] ResultSetDynaClass and DynaValidatorForm
Date Thu, 24 Jul 2003 09:25:12 GMT
Hi

Is it possible to transfer the contents of a ResultSetDynaClass into a
DynaValidatorForm, in a similar way to transferring the ResultSet into an
ArrayList of DynaBeans that uses the following standard code?

ResultSetDynaClass rsdc = ...; 
DynaProperty properties[] = rsdc.getDynaProperties(); 
BasicDynaClass bdc = new BasicDynaClass("foo", BasicDynaBean.class,
rsdc.getDynaProperties()); 

Iterator rows = rsdc.iterator(); 
while (rows.hasNext()) { 
 DynaBean oldRow = (DynaBean) rows.next(); 
 DynaBean newRow = bdc.newInstance(); 
 PropertyUtils.copyProperties(newRow, oldRow); 
 results.add(newRow); 
 } 
 
Thanks

Derek

Mime
View raw message