Return-Path: Delivered-To: apmail-jakarta-struts-user-archive@apache.org Received: (qmail 66250 invoked from network); 24 Jan 2003 22:52:09 -0000 Received: from exchange.sun.com (192.18.33.10) by 208.185.179.12.available.above.net with SMTP; 24 Jan 2003 22:52:09 -0000 Received: (qmail 8267 invoked by uid 97); 24 Jan 2003 22:53:16 -0000 Delivered-To: qmlist-jakarta-archive-struts-user@jakarta.apache.org Received: (qmail 8251 invoked by uid 97); 24 Jan 2003 22:53:16 -0000 Mailing-List: contact struts-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Struts Users Mailing List" Reply-To: "Struts Users Mailing List" Delivered-To: mailing list struts-user@jakarta.apache.org Received: (qmail 8237 invoked by uid 98); 24 Jan 2003 22:53:15 -0000 X-Antivirus: nagoya (v4218 created Aug 14 2002) Content-return: allowed Date: Fri, 24 Jan 2003 15:49:35 -0700 From: Wendy Smoak Subject: RE: Validator validates too early (was RE: Validator won't valida te single required field) To: 'Struts Users Mailing List' Message-id: MIME-version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-type: multipart/alternative; boundary="Boundary_(ID_kJE9+03VeEEPP/Kx8Qqhpw)" X-Spam-Rating: 208.185.179.12.available.above.net 1.6.2 0/1000/N X-Spam-Rating: 208.185.179.12.available.above.net 1.6.2 0/1000/N --Boundary_(ID_kJE9+03VeEEPP/Kx8Qqhpw) Content-type: text/plain; charset="iso-8859-1" David wrote: > 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 > There's no "right" way, just the way that makes sense for you. I had a walk in the Big Blue Room and realized I was making this way too hard. I don't need to place a token in the session to tell me that this isn't the first time the form has been displayed. There already *is* a token, in the request, commonly known as the Submit button! So now I have this: public final class ChooseProfileForm extends ValidatorForm implements Serializable { public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) { /*only validate if the form has actually been submitted. We can tell this by checking to see if the Submit button is in the request */ if (request.getParameter("Submit") != null) { return super.validate( mapping, request ); } else { return null; } } } And all is well again in my world. :) -- Wendy Smoak Applications Systems Analyst, Sr. Arizona State University PA Information Resources Management --Boundary_(ID_kJE9+03VeEEPP/Kx8Qqhpw)--