> > DynaActionForm taxRatesForm = new DynaActionForm(); > > and > > taxRatesForm.set("taxRates", allTaxRates); > > request.setAttribute("taxRates", > > allTaxRates); > > Creating a form in the action servlet is one sure way to piss the folks > off who have to maintain the app. You might think its big n clever, but > you'd be hiding the form away in a class, what do the htmlists do?
Well this does not work for me anyway. When I change the code to do what Richard suggests, I get null pointer exceptions. So is what you are saying Mark is that the way I am doing this (have the form name specified on the preloader action, and do DynaActionForm taxRateForm = (DynaActionForm) form; in the preloader action class) is correct? > <form-property name="taxRate" type="java.util.ArrayList" /> > > Using arraylist means you dont have to use the lazy list initialization > that i think that using an array will require. See bean utils for > details. I could be full of shit but I have this working with arrayList > and no joy with using arrays of beans. > It is working fine for me with an array of beans. I'm not entirely sure what you mean by lazy list initalization, or how it could be a problem here. (I couldn't find a reference in the BeanUtils api, and googling for it didn't return much other than standard java lazy instantiation which from my Java knowledge isn't a problem...) > > I think you have the choice of putting the form in either session or > > request > > scope. Request scope is generally preferable b/c the memory gets > > released > > sooner. > > Yeah right .. Nullpointerexception tastic. Last I looked scoping to > request wont work , so don't bother. My form is in the request scope and working fine. I agree with Richard in preferring request scope, but if there is a valid reason for it to be in session instead I'd move it there. Matt Bathje --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]