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 how to make one jspform have two functions,,as follows Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "how to make one jspform have two functions,,as follows" Watch "how to make one jspform have two functions,,as follows" New topic
Author

how to make one jspform have two functions,,as follows

charlse li
Greenhorn

Joined: Aug 03, 2004
Posts: 14
in one jsp form,,i want to firstly let it display dates queried from database,and then customers modifiy some dates in the form and then submit it to database... i don't have one clear idea to work it out ,,will you please give some suggestion?? thank you
Anthony Watson
Ranch Hand

Joined: Sep 25, 2003
Posts: 327
You could create a FormSetupAction that creates a new instance of your form. The FormSetupAction could then acquire data from the data store, and call the corresponding set methods on the form instance. Next, the FormSetupAction could place the form in the request scope (using request.setAttribute) and return the appropriate ActionForward.


Anthony W.<br />MCP, SCJP 1.4, SCJD, SCWCD 1.3, SCWCD 1.4, SCBCD
charlse li
Greenhorn

Joined: Aug 03, 2004
Posts: 14
many thanks!
i have realized it .I use two submit button to do two different things,,and in the ACTION,i retrieve which button customer pressed,and let the code do corresponding act.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to make one jspform have two functions,,as follows
 
Similar Threads
choosing current date from database
Date checking
jstl reformat date
how do i get todays dat without the time
fake date problem