File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes Query in  Action Form Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Query in  Action Form" Watch "Query in  Action Form" New topic
Author

Query in Action Form

Muralitharan Pannerselvam
Greenhorn

Joined: Jun 07, 2006
Posts: 15
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.


Thanks and Regards,<br />Muralitharan P
Dattatray Sutar
Ranch Hand

Joined: Jul 12, 2006
Posts: 46
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.


with regards<br />Datta.<br /> <br />To the world you might be one person, but to one person you just might be the world !
H Ritwick
Greenhorn

Joined: Mar 15, 2006
Posts: 18
you might want to look at indexed properties.

http://struts.apache.org/1.x/struts-taglib/indexedprops.html
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Query in Action Form