File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Dynamic form table generation and naming of form fields

 
Peter Maxwell
Greenhorn
Posts: 14
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
G'day everybody,

I have a database table with fields product,manufacturers and suppliers. I am using a bean which returns an ArrayList of these values which i am using to display the table in a jsp. Now i would like to have another jsp which generates a 10x3 table of cells having input fields(text boxes) in which i would enter these values(product,Manufacturer,supplier) and submit them to the database.
My problem is how would i go about naming these 10x3 input form fields?. For getting the data from the bean i use ArrayList which contains the ResultSet. Similarly how can i submit them to the database using a bean?. Is there any standard way to do things like this?.

After hours of work,I am completely stumped at this . Any help in any form(links, suggestions)would be very much appreciated.

PS:
I am using eclipse ganymede IDE to develop my program and the following line of code

gives me a warning "Array List is a raw type.References to generic type ArrayList<E> should be parameterized".
How can i remove this warning?

Thanks in advance.
 
Shashank Rudra
Ranch Hand
Posts: 131
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First part, to insert the data in the table we can have it as simple ArrayList<ArrayList<String>> instead of ResultSet. As we have populated the HTML elements with using that only. (if I have been following you correctly).

To get rid of warning we can use <ArrayList><String>> in place of E.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic