On 5/8/2004 4:58 PM, Murali Ravipudi wrote:
What is the best way to define different actions for the same form with
struts?
I did something like this:
==
<action name="usermanager" type="UserManagerAction" validate="true" />
<forward to confirmation jsp which picks up current state from a
SessionModel>
==
In jsp,
<html:submit property="addUser">
Add User
</html:submit>
<html:submit property="editUser">
Edit User
</html:submit>
<html:submit property="deleteUser">
Delete User
</html:submit>
==
In action.execute() {
String addButtonClicked = request.getParameter("addUser");
if (addButtonClicked != null) {
// add user code here
}
String editButtonClicked = request.getParameter("editUser");
if (editButtonClicked != null) {
// edit user code here
}
==
This is what I could think of and worked fine for me, but this may not be
the best way to do this.
Murali
This message is confidential and may also be legally privileged. If you are not the intended recipient, please notify [EMAIL PROTECTED] immediately. You should not copy it or use it for any purpose, nor disclose its contents to any other person. The views and opinions expressed in this e-mail message are the author's own and may not reflect the views and opinions of ADP Private Limited.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
you can also try lookupdispatchaction
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]