Okay I fixed it...

1. I defined a form property as an ArrayList.
<form-property name="myprop" type="java.util.ArrayList" ...
2. Scoped my form to session in the referring action. (<action name="myForm" scope="session"
3. In the referring action populate and arrayList and then set the value of the form property to the newly populated arrayList.
ArrayList myList ...


theForm.set("myprop",mylist);

I'm going to have a go using an array rather than ArrayList, but it works like this.



On Monday, August 4, 2003, at 10:45 AM, Mark Lowe wrote:

I read this article the other day which contains the following quote:
http://developer.com/java/ejb/article.php/2233591

<quote>
You can even dynamically specify the size of the form (and prepopulate it) at run time.  I've recently used this technique with an insurance application where the user has to choose various parameters such as copays and deductables for a claim modeling system.  by using an Action instead of a forward to precreate the form-property value, and leaving the size parameter out.  The actual can then create an array of the appropriate size and prepopulate values.  The only trick is that the form must be placed in session scope, because it needs to be available and of the right size to accept the submitted values.
</quote>


Can somebody tell me if this is possible, I've tried in every way I can think of and it still has to happen. Please somebody put me out my ignorance, enlighten me, show me the error of my ways. I've tried too many options to add any coherence to this mail by adding some > examples.

Cheers Mark






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



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



Reply via email to