Sure but I found that you need to always need to scope to session. And/or have links in you forms. Or create a javascript dependency changing the action.

or have you a way aorund this problem using actions?

On 30 Mar 2004, at 18:33, Menke, John wrote:

we have found that implementing 1 action for add 1 action for edit etc... is
better from the standpoint of maintainability. (it's easier to find the
edit code if it's in the edit Action) we avoid code duplication by making
abstract actions that contain the duplicated code


ie.

AbstractPersonAction - contains common code for person creation update
delete, etc...
AddPersonAction - add specific code
EditPersonAction - edit specific code


btw. we also try to keep 3 seperate jsps. this may seem like more work but
the complications that can arise from having too many <choose> tags in your
jsps to switch between modes outweigh
the addition overhead of extra jsps in the long run.


-----Original Message-----
From: Joao Batistella [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 30, 2004 11:28 AM
To: 'Struts Users Mailing List'
Subject: One Action class but more than one functionality


Hello.
I have an action class to create, edit and remove a Person, for example.
Is this a poor decision? I mean, should I create 3 action classes, one for
create, another for edit and another one for remove?
Does struts have a mechanism to help me in that?
Thanks all.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to