This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of Real-World Software Development: A Project-Driven Guide to Fundamentals in Java and have Dr. Raoul-Gabriel Urma & Richard Warburton on-line!
See this thread for details.
Win a flower (🌹) or copy of Real-World Software Development: A Project-Driven Guide to Fundamentals in Java (📚) this week in the Agile and Other Processes 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 ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Liutauras Vilda
  • Knute Snortum
  • Bear Bibeault
master stewards:
  • Devaka Cooray
  • Jeanne Boyarsky
  • Junilu Lacar
garden masters:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • salvin francis
gardeners:
  • Tim Holloway
  • Piet Souris
  • Frits Walraven

Query in Action Form

  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can anyone help me in this?
I have two jsp pages. First one has a drop down box with values (1-4).The second page has two input fields (Name and Id) and a submit button.The second page is populated based on what the user selects in the first page. If he selects two then the second page should have two sets of Name and Id input fields but only one submit button.I want to have only one form bean for this jsp page. How can i handle this form in the action class and retrive each value of Name and Id.
 
pioneer
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Muralitharan Pannerselvam:
Can anyone help me in this?
I have two jsp pages. First one has a drop down box with values (1-4).The second page has two input fields (Name and Id) and a submit button.The second page is populated based on what the user selects in the first page. If he selects two then the second page should have two sets of Name and Id input fields but only one submit button.I want to have only one form bean for this jsp page. How can i handle this form in the action class and retrive each value of Name and Id.



You can use your form bean to extend DynaFormbean. i.e. Struts formbean which is built dynamically by using xml descriptors, so that depending on your need you can show some fields and hide the remaining. Thus your formbean having whatever maximum no. of properties and showing some of them dynamicaly while hiding the remainings.
 
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you might want to look at indexed properties.

http://struts.apache.org/1.x/struts-taglib/indexedprops.html
 
Look ma! I'm selling my stuff!
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!