Return-Path: Delivered-To: apmail-struts-user-archive@www.apache.org Received: (qmail 79391 invoked from network); 14 May 2004 05:05:28 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 14 May 2004 05:05:28 -0000 Received: (qmail 54602 invoked by uid 500); 14 May 2004 05:05:22 -0000 Delivered-To: apmail-struts-user-archive@struts.apache.org Received: (qmail 54430 invoked by uid 500); 14 May 2004 05:05:21 -0000 Mailing-List: contact user-help@struts.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 user@struts.apache.org Received: (qmail 54316 invoked by uid 98); 14 May 2004 05:05:20 -0000 Received: from AmolY@quinnox.com by hermes.apache.org by uid 82 with qmail-scanner-1.20 (clamuko: 0.70. Clear:RC:0(203.193.153.99):. Processed in 0.215513 secs); 14 May 2004 05:05:20 -0000 X-Qmail-Scanner-Mail-From: AmolY@quinnox.com via hermes.apache.org X-Qmail-Scanner: 1.20 (Clear:RC:0(203.193.153.99):. Processed in 0.215513 secs) Received: from unknown (HELO is3cm?mail.is3c.com) (203.193.153.99) by hermes.apache.org with SMTP; 14 May 2004 05:05:20 -0000 Received: by IS3CM_MAIL with Internet Mail Service (5.5.2657.72) id ; Fri, 14 May 2004 10:38:46 +0530 Message-ID: From: Amol Yadwadkar To: Struts Users Mailing List Subject: RE: How to set an ActionForm to null Date: Fri, 14 May 2004 10:38:45 +0530 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2657.72) Content-Type: text/plain; charset="iso-8859-1" X-Spam-Rating: hermes.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Has your ActionMappings at Struts-config.xml contains the name of the form which you are using ? -----Original Message----- From: pls [mailto:abenwoha@hotmail.com] Sent: Friday, May 14, 2004 10:31 AM To: user@struts.apache.org Subject: Re: How to set an ActionForm to null thanks for the suggestion Amol, but that returns an IllegalStateException.. thanks for trying anyways. "Amol Yadwadkar" wrote in message news:DC3F2CFCB6D7684A824DACC7DD1C1322011EE9F9@IS3CM_MAIL... > Hi, > I havn't tried this but just try this in the execute method :-- > public ActionForward execute(ActionMapping mapping, ActionForm form, > HttpServletRequest req, HttpServletResponse res) { > ........ > ... > ... > mapping.setAttribute(null); > > } > > Hope this may help you!!! > --Amol > > -----Original Message----- > From: pls [mailto:abenwoha@hotmail.com] > Sent: Friday, May 14, 2004 10:03 AM > To: user@struts.apache.org > Subject: How to set an ActionForm to null > > > hi there, > > i am trying to set an actionform to null after inserting it's properties > into a DB. > then, control is forwarded to a different action and the info is read from > the DB back into the actionform for display by a JSP. > > the only part that is giving me trouble is with explicitly setting my > actionform "MBForm" to null. After several form submissions and a DB > update, the first Action attempts to clear the values in MBForm: > > request.getSession().setAttribute("MBForm", null); > > after this, control is forwarded to the second Action which handles the > display. it checks to see if MBForm is null and, if it is, it fills MBForm > from a DB. in between these two actions, the controller servlet is > automatically refilling the MBForm with the values that I just nullified.. > the only bean property that stays empty is myHash which represents several > groups of multiboxes. i believe this is a result of the MBForm reset() > method which contains the following: > > myHash.put(multiBoxCategories, new Integer[0]); //resets several > groups of multiboxes > > setting other properties to null in the reset() method is not the solution > as it wipes the value out after every (but somehow it doesn't do the same > thing to the multiboxes?!?) > > let me know if this enough background for you to help me diagnose the > problem.. any discussion of reset() or is welcome.. thanks > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org > For additional commands, e-mail: user-help@struts.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@struts.apache.org For additional commands, e-mail: user-help@struts.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@struts.apache.org For additional commands, e-mail: user-help@struts.apache.org