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.