• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
charlse li
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 327
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
charlse li
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic