• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Dynamic Row table Help

 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi guys,

I need to write a dynamic row table which will add a new row every time I select a resource from a dropdown menu and put in start and end dates and hit an Add button. I have done this before in a program called App Page builder which programs directly to Informix, but am now working in Java and Hibernate. I would also like to run a test over the selection before I actually add it to the database. I need some help to implement the same thing in Java/JSP. Do I build an ArrayList and Pass to the selct then refresh the table and add a row after I hit the Add button? How would I do this for an edit?

All help gratefully appreciated
 
Ranch Hand
Posts: 308
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When you click the add button, 'post' (doPost of servlet will be executed) your form.
The parameters you selected (resource, start date and end date) will be in request object.
Parse the request to get the value for each parameter and store it in a bean.
Pass the bean to hibernate for persistence.


Do I build an ArrayList and Pass to the selct then refresh the table and add a row after I hit the Add button?


Are you using the arraylist for caching the data? If yes the bean can go in Arraylist before persisting.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic