Return-Path: Delivered-To: apmail-struts-user-archive@www.apache.org Received: (qmail 32249 invoked from network); 26 Mar 2009 18:13:31 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 26 Mar 2009 18:13:31 -0000 Received: (qmail 23559 invoked by uid 500); 26 Mar 2009 18:13:28 -0000 Delivered-To: apmail-struts-user-archive@struts.apache.org Received: (qmail 23507 invoked by uid 500); 26 Mar 2009 18:13:28 -0000 Mailing-List: contact user-help@struts.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Struts Users Mailing List" Reply-To: "Struts Users Mailing List" Delivered-To: mailing list user@struts.apache.org Received: (qmail 23497 invoked by uid 99); 26 Mar 2009 18:13:28 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 26 Mar 2009 18:13:28 +0000 X-ASF-Spam-Status: No, hits=2.6 required=10.0 tests=DNS_FROM_OPENWHOIS,SPF_HELO_PASS,SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 26 Mar 2009 18:13:20 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1Lmu4a-0001y9-1E for user@struts.apache.org; Thu, 26 Mar 2009 11:13:00 -0700 Message-ID: <22727895.post@talk.nabble.com> Date: Thu, 26 Mar 2009 11:13:00 -0700 (PDT) From: boraldo To: user@struts.apache.org Subject: Re: How to avoid validation if request was done by GET method? In-Reply-To: <49CBBCA4.5090707@gmx.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: boraldo@hotbox.ru References: <22709587.post@talk.nabble.com> <49CBBCA4.5090707@gmx.de> X-Virus-Checked: Checked by ClamAV on apache.org Do I understand properly that ActionSupport.validate method that you used here performs the same validation as validation interceptor ? How can I see if there were validation errors ? benjamin haimerl wrote: > > hi boraldo > > a very simple way should be: > > > Action: > > YourActionConnetedToTheFormAction extends Action..{ > > execute(..){ > > String qString = request.getQueryString(); > if(qString!=null && paramsFound(...)) > // *paramsFound() = check if your formParams were given by query String > } > else { > //check if your formBean is set (depends on the scope you have set in > your struts-config.xml) > //e.g. > if(request.getAttribute(yourForm)!=null) { > yourForm.validate() { > } > } > } > > } > > should work ;) > > > > boraldo wrote: >> I have a form. And I want to have one url for form itself and for >> submitting >> it. >> Controller should look at method and if it is GET, show form, if POST - >> make >> validations and so on. >> >> How can I do it ? >> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org > For additional commands, e-mail: user-help@struts.apache.org > > > -- View this message in context: http://www.nabble.com/How-to-avoid-validation-if-request-was-done-by-GET-method--tp22709587p22727895.html Sent from the Struts - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@struts.apache.org For additional commands, e-mail: user-help@struts.apache.org