That was a poor suggestion and I highly doubt any Struts committer would give you the same advice ;-).

The naming convention in the example app wasn't intuitive for me so I usually do:

GetAccountFormAction maps to getAccountForm.do
SaveAccountFormAction maps to saveAccountForm.do

If I'm not dealing with a form (like your situation) I'll use something like:

GetAccountIndexPageAction => index.do
or
ViewAccountsAction => viewAccounts.do

There's no "right" way, just the way that makes sense for you.

David






From: Wendy Smoak <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: 'Struts Users Mailing List' <[EMAIL PROTECTED]>
Subject: Validator validates too early (was RE: Validator won't validate single required field)
Date: Fri, 24 Jan 2003 15:06:09 -0700

> You wouldn't want to hit the JSP first anyways ;-).

It was suggested by another person here and I just wanted to rule it out in
case it was your next suggestion. :)

> I believe both of your
> thoughts will work but I would try the separate action mapping idea first.

I did, and it works, but... BLECH! I have to duplicate every single action
mapping?! And what am I supposed to call them? someAction.do is so clean,
and now I have to have someActionFirstTime.do? Or perhaps I keep the first
one with the clean name and call the others someAction2?

I'm examining the struts-example with JSP's under WEB-INF, and I think the
difference is my use of LookupDispatchAction vs. separate Actions for each
thing: edit/save/create.

This particular form isn't a CRUD form, it's a "Select the person you want
to view read-only info on", so I can't quite make the createSomething,
editSomething, updateSomething pattern fit.

And it kind of defeats the purpose of LookupDispatchAction to have to map it
several times.

I'm still pondering what to do about this. I'm currently going with
someAction.do and someActionNV.do (for No Validation). Ideas appreciated!

--
Wendy Smoak
Applications Systems Analyst, Sr.
Arizona State University PA Information Resources Management

_________________________________________________________________
The new MSN 8: advanced junk mail protection and 2 months FREE* http://join.msn.com/?page=features/junkmail


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

Reply via email to