• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Query in Action Form

 
Muralitharan Pannerselvam
Greenhorn
Posts: 15
  • 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.
 
Dattatray Sutar
Ranch Hand
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.
 
H Ritwick
Greenhorn
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic