DynaAction form and ArrayList

2003-11-03 Thread Barry Volpe
Only Last row is available in my ArrayList? Have the following: ArrayList teachers = new ArrayList(); DynaActionForm teacherForm = (DynaActionForm)form; while ( rs.next() ) { System.out.println(firstname.rs: + rs.getString(firstname)); System.out.println(lastname.rs: +

RE: DynaAction form and ArrayList

2003-11-03 Thread David Friedman
Users Mailing List Subject: DynaAction form and ArrayList Only Last row is available in my ArrayList? Have the following: ArrayList teachers = new ArrayList(); DynaActionForm teacherForm = (DynaActionForm)form; while ( rs.next() ) { System.out.println(firstname.rs: + rs.getString(firstname

Re: DynaAction form and ArrayList

2003-11-03 Thread Mark Lowe
while(rs.next()) { Map teacher = new HashMap(); teacher.put(firstName,rs.getString(firstName)); teacherList.add(teacher); } teacherForm.set(teachers, teacherList); request.setAttribute (teachers, teacherList.toArray()); Cheers Mark On Monday, November 3, 2003, at 07:35

Re: DynaAction form and ArrayList

2003-11-03 Thread Kris Schneider
Per the JavaDoc for RowSetDynaClass: import org.apache.commons.beanutils.RowSetDynaClass; ... Connection conn = ...; // Acquire connection from pool Statement stmt = conn.createStatement(); ResultSet rs = stmt.executeQuery(SELECT ...); RowSetDynaClass rsdc = new RowSetDynaClass(rs); rs.close();

Re: DynaAction form and ArrayList

2003-11-03 Thread Mark Lowe
It works alright but last time i played with these beanutil's toys it was understandably slow. A little less slower is getting the resultsetmetadata and using them as your property names. IMO its better to make some beans and populate them with the result set values, until you've time to put a

Re: DynaAction form and ArrayList

2003-11-03 Thread Kris Schneider
That's just what RowSetDynaClass and the implementation of the Result interface in JSTL do (use ResultSetMetaData to grab column names). Quoting Mark Lowe [EMAIL PROTECTED]: It works alright but last time i played with these beanutil's toys it was understandably slow. A little less slower is

Re: DynaAction form and ArrayList

2003-11-03 Thread Barry Volpe
Thanks Mark Your suggestion worked. I did not use the teacherForm.set(teachers, teacherList);? It looks like this is accomplished without using DynaAction Form and using JSTL in my jsp page. Barry - Original Message - From: Mark Lowe [EMAIL PROTECTED] To: Struts Users Mailing List

DynaAction Form

2002-12-03 Thread Pat Quinn
Hi all, I have a java value object (i.e. MyVo) which i add the DynaAction Form Below. When i display my jsp it works fine using headerVO.firstName but when i submit the page to save user changes i get the following error: java.lang.IllegalArgumentException: No bean specified

DynaAction form - can I use a boolean primitive

2002-06-24 Thread @Basebeans.com
Subject: DynaAction form - can I use a boolean primitive From: Matt Raible [EMAIL PROTECTED] === When defining my DynaActionForm in struts-config.xml, is this possible: form-property name=allowBrowsing type=boolean / -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional

RE: DynaAction form - can I use a boolean primitive

2002-06-24 Thread James Mitchell
PM To: [EMAIL PROTECTED] Subject: DynaAction form - can I use a boolean primitive Subject: DynaAction form - can I use a boolean primitive From: Matt Raible [EMAIL PROTECTED] === When defining my DynaActionForm in struts-config.xml, is this possible: form-property name=allowBrowsing