I was unable to address this issue myself, Ajay.  I use a combination of an
ActionForm for the static fields and naming conventions for the dynamically
generated fields plus parameter handling for these in the Action class.
This is not very aesthetically pleasing, however.

I have heard that Struts support for this is in development, but don't quote
me on that.  What we need is the ability to specify input name patterns for
fields that will get stored in an ArrayList when the request is processed.

For instance:
// in the new Struts tag:
 <dynaList pattern="param*" name="myFieldList" />

// Some dynamically generated stuff in the request:
param1 = value1
param2 = value2
param3 = value3


...and these key-value pairs would get stored in myFieldList, an instance of
ArrayList.  Anybody know if this is in the works?


cheers,
Joe



> -----Original Message-----
> From: Ajay Mallik [mailto:[EMAIL PROTECTED]]
> Sent: Monday, April 29, 2002 2:54 PM
> To: 'Struts Users Mailing List'
> Subject: PLEASE HELP !!!
>
>
>
> Hi All,
> I am new to Struts. I need to create an action-form dynamically when the
> user submits a form. The form in the client side is generated dynamically,
> as a result I cannot create any fields in the action-form class associated
> with the action. The user can submit simple data as textbox or can submit
> MIME type multipart request as in file upload.
>
> For the above problem I can retrieve the values by using
> request.getParameterNames() and so on, but that is not elegant, I
> guess. Can
> I do that "the struts way"? Also, do I need to distinguish between
> mulitipart form data from the simple ones like textboxes?
>
> I will highly appreciate any help in this regard. I have been struggling
> with it.
> Thanks.
> Ajay
>
> --
> 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