Re: Dynamic Form Beans?

2001-08-29 Thread Sastry Varanasi

I have the same problem too, and I'm sure there are many more like us. I 
believe this is a problem struts has not addressed yet. Fortunately, they 
are working on Dynamic form generation feature for struts1.1. I don't know 
when it is going to be ready!!

Here is a work-around: Make your JSPs without using FormBeans (you should 
have your won Java classes to dynamically generate the form), and extract 
input parameters from request in your action and stuff them into a 
Hashtable for further processing. However, someone should clarify if this 
approach violates struts recommended architecture.

I would definitely like to see a better solution. I have posted similar 
questions earlier on this topic, but I have got no response.

Sastry.

At 01:27 PM 8/29/2001 -0500, you wrote:
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
 


Sastry Varanasi
Tel : 408-526-6278
INSMBU, Cisco Systems





Forms without beans

2001-08-26 Thread Sastry Varanasi

Hello all,

I have a set of Java classes that process an XML configuration file to 
generate HTML form parameter information dynamically. I use this 
information in a JSP file to serve my Form onto the browsers.

I have a servlet to handle the form submission and to validate the user 
data. These validations are configurable through XML. I keep the user data 
in a Java collection class and pass it on to next layer for backend processing.

My question is,  is it possible to use struts for my application? Can I 
make the Servlet as an Action class without having a FormBean to hold the 
data? Is it mandatory to have FormBean whenever I use a Form and an Action 
class?

Can some one please throw some ideas on this?  If this discussion had 
already happened on this mailing list, I would appreciate if someone could 
send me a reference to that thread.

Thanks in advance,
Sastry.




Dynamic form generation.

2001-08-20 Thread Sastry Varanasi

I am trying to use dynamically generated forms with Struts. Since the form 
is dynamic I will not know the form fields until runtime. How do I define 
my FormActionbean in this case? Is there a  way to circumvent the 
requirement of having a Bean for holding the form data? Can anyone help me 
out with some ideas on this?

Thanks,
Sastry.

Sastry Varanasi
Tel : 408-526-6278
INSMBU, Cisco Systems