• 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
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Query in Action Form

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
you might want to look at indexed properties.

http://struts.apache.org/1.x/struts-taglib/indexedprops.html
reply
    Bookmark Topic Watch Topic
  • New Topic