I used "Struts Tip #6 - Use an array to capture multiple parameters" http://www.jguru.com/faq/view.jsp?EID=915898 on my form to capture multiple parameters.

When I loop through these parameters and create an object for each row to add to an array list, the process gets expensive when there are many rows.

eg.

ArrayList rows = new ArrayList();

//rowParameter1, and rowParameter2 are arrays
//passed by the form

for (int i = 0; i:<rowParameter.length; i ++) {
   TestObject test = new TestObject(rowParameter[i], rowParameter[i]);
   rows.add(test);

}

Is there a way to avoid this new in the for loop?

Thanks
Ryan



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to