Win a copy of Emmy in the Key of Code this week in the General Computing forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Ron McLeod
  • Carey Brown
  • Paweł Baczyński
  • Piet Souris
  • Vijitha Kumara

adding dyanmic textboxes and submitting it to ActionForm

Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I am working on struts and i am finding it difficult to implement a scenario in struts.

The scenario is ,

I need to create a list of text boxes based on the number of records from the database and when i submit the form all the values entered in the text boxed should be set in the actionform and i need to access those details in the action class.

The problem is that i dont know how many records will be available to create the number of text boxes.

So how to handle this scenario efficiently.

Suresh B
Ranch Hand
Posts: 368
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
your ActionForm will contain collection of POJO,Each POJO contatin property suppose name(got from database).
while displaying in jsp use "iterate tag" to display text boxes

for more help see this link.
you will get info about iterate tag here.
And will you succeed? Yes you will indeed! (98 and 3/4 % guaranteed) - Seuss. tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!