This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
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 Java 8 in Action this week in the Java 8 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
jstl reformat date
how do i get todays dat without the time
fake date problem
Date checking