Lee,

Nothing wrong about it. And I believe, this splitting would definitely
enable you to have better control over the system.

In fact, if you can manage to migrate to Struts 1.2.x, nothing like
it. They have MappingDispatchAction meant precisely for this. You just
have to put the name of the method you want to call as the parameter
in the ActionMapping declaration and it'll do the rest. However,
there's one restriction: you should create actionmapping for all the
methods that you want to support. You can't have grouped
actionmappings, like you are currently having.

Post back if you need some sample code for MappingDispatchAction.

Kinjal Sonpal
----------------------------------------
A classic is something that everybody wants to have read and nobody
wants to read.
                -- Mark Twain

> -----Original Message-----
> From: Lee Harrington [mailto:[EMAIL PROTECTED]
> Sent: Monday, November 08, 2004 9:26 PM
> To: Struts Users Mailing List
> Subject: Action validation settings with dispatch actions
>
>
> In my project I group the CRUD actions for a table into a single
> dispatch action class.
>
> I've found that sometimes I want the form validate to
> occur, sometimes
> I don't.  To accomodate this, I always have to have two instances of
> my action mappings, one with validate set to true, the
> other to false.
>
> Have I designed poorly?  The two action mappings are the same for
> everything except path name and validate.
>
> Situations where I don't want validations:
>   1. Browse screen -- displays the records
>   2. Calling add screen -- don't need validations to occur when
> calling the add form, only when submitting the add form
>   3. Calling edit screen -- again, it's only after an edit
> has occured
> an you submit the form do you validate.
>   4. Deleting a record -- since I'm deleting, I don't need
> field validation
>
> Situations where I do want validations:
>   1.  Submitting the add form
>   2.  Submitting the edit form
>
> I hope I'm being clear.  For each table I have a single action that
> responds to all the CRUD events.  I use dynamic validator form beans
> and the validator framework.  I have one browse.jsp and one form.jsp
> for each of the tables.  The same form.jsp works for the "add" and
> "edit" and "delete" use cases -- only the buttons differ.
>
> Thoughts?
>
> Lee
>
> ------------------------------------------------------------
> ---------
> 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