This would be entirely up to you... Depending upon the nature of the two
actions one choice may be preferable to the other.

If you wanted to have one action class you would need to check the request
to see which button was pressed. There would be a number of ways to do this
but the most straight forward would probably be to give the two buttons
distinct names. Then, if the "New" button was pressed there will be a
request parameter with it's name...

If you wanted to try the two action class approach you would probably need
to use javascript to toggle the value form's action between the two.

I would probably choose the first option in most cases.

Hope this helps,

Troy


----- Original Message -----
From: "Alberto Corona" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, July 20, 2001 3:19 PM
Subject: Action class question


> Is an Action class responsbile for performing all
> possible actions submitted by a form?
>
> For example, if a Form includes two submit buttons: "New" and "Edit"
> Do I create one Action class that handles both actions?
> If so how do I check which submit button was pressed? Do I just check on
the
> HttpRequest?
>
> Thanks
>
> Alberto Corona
> ObjectWave Corp.
> 312.269.0111
> [EMAIL PROTECTED]
>
>

Reply via email to