Return-Path: Delivered-To: apmail-jakarta-struts-user-archive@apache.org Received: (qmail 213 invoked from network); 19 Sep 2002 15:54:37 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 19 Sep 2002 15:54:37 -0000 Received: (qmail 15584 invoked by uid 97); 19 Sep 2002 15:55:02 -0000 Delivered-To: qmlist-jakarta-archive-struts-user@jakarta.apache.org Received: (qmail 15568 invoked by uid 97); 19 Sep 2002 15:55:02 -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 15555 invoked by uid 98); 19 Sep 2002 15:55:01 -0000 X-Antivirus: nagoya (v4218 created Aug 14 2002) Message-ID: <3D89F17C.5080809@usa.net> Date: Thu, 19 Sep 2002 17:47:08 +0200 From: kiuma User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9) Gecko/00200203 MIME-Version: 1.0 To: Struts Users Mailing List Subject: Re: [STRUTS] Cleasing form fields fields (NOT WORKING) References: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Hello I need scope="session", so I had coded this method into the form public void reset(ActionMapping mapping, javax.servlet.http.HttpServletRequest request) { resetFields(); } but vhe I call from an execute method: return mapping.findForward( "/secure/customeredit.jsp" ); my fields remain full of old data. Does anyone know a solution? Andrew Hill wrote: >The scope into which struts places the ActionForm instance is defined by you >in the struts config file in the action definition. For example in the >follwing action definition thingy the "scope" attribute states to use the >request context. If you specify session, then the session context will be >used. > >type="com.unist.plot.to.conquer.the.World" >name="evilActionForm" >scope="request" >input="/secretPlans.jsp"> > > > > >To have your fields reset to default values when a request is made, you may >override the reset() method in ActionForm and set the default field values >there. (If you are using any checkboxes you will want to do this anyway to >set them to false). > >The signature of the reset() method is: > >public final void reset(ActionMapping mapping, HttpServletRequest request); > >This is called by struts before it populates the ActionForm from a request. > >-----Original Message----- >From: kiuma [mailto:kiuma@usa.net] >Sent: Thursday, September 19, 2002 21:44 >To: Struts Users Mailing List >Subject: [STRUTS] Cleasing form fields fields > > >Hello, > >how can I have a clean form field the second time I visit it? >It seems it keeps data into session. How can I clean those fields, >without cleaning other informations? > >Thanks, >kiuma > > >-- >To unsubscribe, e-mail: > >For additional commands, e-mail: > > > >-- >To unsubscribe, e-mail: >For additional commands, e-mail: > >. > -- To unsubscribe, e-mail: For additional commands, e-mail: