This will work if the form is in session scope, but NOT if it is in request scope. the 
reason being is that the form is recreated every time, and the parameterList will be 
null.

what is needed is some kind of creation description in the config file - which I built 
a quick version of yesterday. I don't know if the dynamic form beans are supposed to 
fix this kind of issue... does anybody know? (aka when is that going to get 
documented? lol)

if not I should be able tidy this stuff up a bit and submit it to somebody who can do 
the proper integration.

my config xml stuff looks like this:

<form-creation-definition name="aForm">
    <form-creation-property name="someProperties"
                type="java.util.ArrayList"
                sizeProperty="propertyCount"
                childType="foo.bar.SomePropertyType">

                <form-creation-property
                         name="subProperties"
                         type="java.util.Vector"
                         sizeProperty="someProperties[].subPropertiesSize"
                         childType="foo.bar.AnotherPropertyType"/>
     
    </form-creation-property>
</form-creation-definition>

only aggravating thing is placing the size of collections into the form, so they can 
(have) to be written out by <nested:hidden>s. Would be easier if either the collection 
interfaces could be accessed as a bean properly (ie. getSize() instead of size() ) or 
the commons output code could handle it.

Regards
Ian


>>> [EMAIL PROTECTED] 03/27/02 07:54pm >>>
Hi, Perpetua
The attachement is  the example,  I tested it, it is OK.
It is not my work. A kind person.send me.
Hope it is useful for you.

Annie


----- Original Message -----
From: "Ted Husted" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, March 27, 2002 5:42 AM
Subject: Re: Form Beans - Vector


> Generally, specifying the type seems to help.
>
> .. type="java.util.Vector" ...
>
> I don't use Vectors myself, since the synchronized aspect is not useful
> in the kind of applications I tend to work on, but using them with the
> iterate tags does seem to generate a lot of messages.
>
> If you continue to have problems, and if it's possible to use another
> collection class, like ArrayList, I'd do that. If not, I'd add a helper
> method that returned the Vector as an array.
>
> -- Ted Husted, Husted dot Com, Fairport NY US
> -- Developing Java Web Applications with Struts
> -- Tel: +1 585 737-3463
> -- Web: http://husted.com/about/services 
>
> Perpetua Cysne wrote:
> >
> > Could someone please provide me with an example of Form Beans using a
Vector
> > of objects? How do display it in a iterate tag?
> >
> > The object is Passenger(firstName, lastName).
> >
> > Thank you!
> >
> > Perpetua
> >
> > --
> > To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>
>


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

Reply via email to