wood burning stoves 2.0*
The moose likes Struts and the fly likes form with submit option Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "form with submit option" Watch "form with submit option" New topic
Author

form with submit option

A knibbs
Ranch Hand

Joined: Aug 23, 2006
Posts: 158
Hi all I have a form that has a bunch of items with each item being associated with a checkbox. In the past I was using the checkboxes as a manner of deleting each of the items, but I realize now that is inadequate for what I need. I need to be able to edit the items or delete them depending on that choice. Can anyone suggest any nice manners in which to accomplish this ?
Nick Williamson
Ranch Hand

Joined: Jan 06, 2007
Posts: 73
use a dispatch action and use javascript to set the method name on the form (to tell dispatch action which method to execute) then have your javascript submit the form. (the edit button would set the method to edit and the delete button would set the method to delete).
A knibbs
Ranch Hand

Joined: Aug 23, 2006
Posts: 158
Thanks for the suggestion but is there anywhere that might have some sample code of something similiar ? I'm still learning how everything interacts in struts, and unfortunately I learn by seeing now by explanation.

If not thanks for the help so far.
 
 
subject: form with submit option