Hi John,

  Are you able to slove this problem?if so, Can you help me out?

Stephen.


> -----Original Message-----
> From: John Townsend [SMTP:[EMAIL PROTECTED]]
> Sent: Wednesday, August 29, 2001 8:19 PM
> To:   [EMAIL PROTECTED]; 'Luis Olivares'
> Subject:      RE: Dynamic Form Beans?
> 
> The one idea that I had was to create a new subclass of ActionForm
> called ActionDataForm. This form would have get and put methods that use
> keys instead of the usual pattern of numerous getters/setters. 
>  
> 
> For the process of saving form data, we could add a new override to
> RequestUtils.processPopulate(..) which would take an ActionDataForm
> instead of an ActionForm as its form instance. Then we would implement
> this method to use get and put with keys instead of getters/setters.
> 
> One problem: I don't know how the populate works from the other side
> (meaning when you want to prepopulate a form based on the contents of a
> JavaBean in the session, etc.). I imagine that logic is contained in the
> HTML tag libraries or some other tag library.
> 
> I guess what I am wondering is that since a number of people have run
> into this and needed a solution I assumed that there might already be a
> solution to this problem. If not, maybe we can find a solution and then
> submit a patch to Struts for 1.1 or something.
> 
> Anyone else have any thoughts on this?
> 
> -- John Townsend
> 
> PS. One thing I just thought of: I wonder if there is a JavaBeans
> solution to this problem? If there is, that might be a better way to go.
> 
> 
> -----Original Message-----
> From: Luis Olivares [mailto:[EMAIL PROTECTED]] 
> Sent: Wednesday, August 29, 2001 11:28 AM
> To: [EMAIL PROTECTED]
> Subject: Re: Dynamic Form Beans?
> 
> I have the same 'problem'.
> 
> I would like to be able to create a form dynamically depending on the
> structure of a table (I used to do this with 'plain' JSP).
> Any ideas?
> 
> Regards.
>                        Luis Olivares.
>            [EMAIL PROTECTED]
>    --------------------------------------------------------------
>   "Intelligence is the ability to avoid doing
>        work, yet getting the work done"
>                   --Linus Torvalds--
> 
> ----- Original Message -----
> From: "John Townsend" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, August 29, 2001 12:54 PM
> Subject: Dynamic Form Beans?
> 
> 
> > I am working on a project where is would be nice to have the ability
> to
> > define a dynamic form bean (i.e. a form bean where the fields are
> > defined at runtime). The most obvious (but perhaps not the best)
> > solution to this problem would be if the ActionServlet could handle
> > saving data in a form bean that was a hashtable.
> >
> > Has someone else run into this problem and come up with a solution?
> >
> > Thanks,
> > -- John Townsend
> >

Reply via email to