Re: Problems initializing form objects

2004-12-14 Thread Diego Manilla Suárez
Hi Jeff, thanks for your answer. I was already doing that, using two actions (well, using two different methods of a LookupAction), one to initialize the list and the other to process it, but the problem arises when I submit the form in "page.jsp". Jeff Beal wrote: When I have this sort of thin

Re: Problems initializing form objects

2004-12-14 Thread Diego Manilla Suárez
Thanks a lot for your answers, Andrew. I think I can't use a LazyList. The problem is that I don't only need to know the size of the list dynamically, but also the type of its objects. All of them share a common interface, but their concrete class is unknown beforehand, so I can't make the list

Re: Problems initializing form objects

2004-12-13 Thread Andrew Hill
The problem here is the need to be able to populate the form from a submission. Initialising it in the action before forwarding to the view is okay when rendering the page to the browser, but when interpreting the forms submission, struts is going to instantiate the new actionform instance (its

Re: Problems initializing form objects

2004-12-13 Thread Jeff Beal
When I have this sort of thing, I usually put it in an "initializer" Action that I always link to in place of the JSP. -- Jeff Diego Manilla Suárez wrote: Hi! I have a problem with form members initialization. I have this form. public class BasicContentForm extends ValidatorForm {

Re: Problems initializing form objects

2004-12-13 Thread Andrew Hill
Been a while since Ive done it, but this sort of thing can be managed using a lazy list (from commons-collections). http://jakarta.apache.org/commons/collections/api/org/apache/commons/collections/ListUtils.html#lazyList [http://jakarta.apache.org/commons/collections/api/org/apache/commons/collec