struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brian Holzer" <bhol...@sgi.sk.ca>
Subject RE: Form not keeping changed values
Date Thu, 18 Jul 2002 18:36:23 GMT
Hi Pam,
   I believe that if you set the scope of your form to session, rather than request and set
redirect="true" for the definition of your local forward in the struts-config.xml file. I
think that your changes should remain in tact when you get to the next Action ( this assumes,
of course that your reset() method on the form does nothing).  I don't know if this will fit
into your design but I believe that this will work.

Brian

>>> "Wilinski, Pamela M." <pwilinski@Kraft.com> 07/18/02 09:35am >>>

That's where the issue lies...it forwards to an action. It seems that an 
action calling an action isn't a workable solution. I'll have to revisit 
the design and see if I can come up with a better solution. 

Thanks for your help. 

-----Original Message----- 
From: James Mitchell [ mailto:jmitchtx@telocity.com] 
Sent: Thursday, July 18, 2002 1:04 AM 
To: Struts Users Mailing List 
Subject: RE: Form not keeping changed values 


This will work just fine if forwarding to a jsp and not another action. 


James Mitchell 
Software Engineer\Struts Evangelist 
Struts-Atlanta, the "Open Minded Developer Network" 
http://www.open-tools.org/struts-atlanta 




> -----Original Message----- 
> From: Wilinski, Pamela M. [ mailto:pwilinski@Kraft.com] 
> Sent: Wednesday, July 17, 2002 5:46 PM 
> To: 'Struts Users Mailing List' 
> Subject: RE: Form not keeping changed values 
> 
> 
> public ActionForward perform( 
> ActionMapping mapping, 
> ActionForm form, 
> HttpServletRequest request, 
> HttpServletResponse response) 
> throws ServletException 
> { 
> KRLogger.addContext(KRActionUtil.getUserId(request)); 
> 
> ActionForward forward = mapping.findForward("success"); 
> ActionErrors errors = new ActionErrors(); 
> //ReportForm reportForm = null; 
> 
> if (form instanceof ReportForm) { 
> ReportForm reportForm = (ReportForm) form; 
> 
> <<make various changes to form using reportForm.set*() methods. Also 
> determining value of forward based upon field from form>> 
> 
> request.setAttribute(mapping.getName(),reportForm); 
> 
> return (forward); 
> } 
> 
> Once I get to the action I forward to the changes I made are gone. 
> 
> -----Original Message----- 
> From: James Mitchell [ mailto:jmitchtx@telocity.com] 
> Sent: Wednesday, July 17, 2002 4:27 PM 
> To: Struts Users Mailing List 
> Subject: RE: Form not keeping changed values 
> 
> 
> What do you mean it didn't work? 
> 
> Can you provide a few snippets of code? 
> 
> 
> James Mitchell 
> Software Engineer\Struts Evangelist 
> Struts-Atlanta, the "Open Minded Developer Network" 
> http://www.open-tools.org/struts-atlanta 
> 
> 
> 
> 
> > -----Original Message----- 
> > From: Wilinski, Pamela M. [ mailto:pwilinski@Kraft.com] 
> > Sent: Wednesday, July 17, 2002 5:16 PM 
> > To: 'Struts Users Mailing List' 
> > Subject: RE: Form not keeping changed values 
> > 
> > 
> > I tried that and it didn't work. 
> > 
> > -----Original Message----- 
> > From: James Mitchell [ mailto:jmitchtx@telocity.com] 
> > Sent: Wednesday, July 17, 2002 4:04 PM 
> > To: Struts Users Mailing List 
> > Subject: RE: Form not keeping changed values 
> > 
> > 
> > Are you saving the form in the request (or session) before forwarding? 
> > 
> > James Mitchell 
> > Software Engineer\Struts Evangelist 
> > Struts-Atlanta, the "Open Minded Developer Network" 
> > http://www.open-tools.org/struts-atlanta 
> > 
> > 
> > 
> > 
> > > -----Original Message----- 
> > > From: pmwilinski [ mailto:pwilinski@kraft.com] 
> > > Sent: Wednesday, July 17, 2002 8:57 AM 
> > > To: struts-user@jakarta.apache.org 
> > > Subject: Form not keeping changed values 
> > > 
> > > 
> > > Hi all, 
> > > 
> > > I have a problem with changes that are made in the action to values 
> > > in my form being thrown out when it forwards to the next page. Does 
> > > anyone know why this might be happening and how to make the changes 
> > > stick??? 
> > > 
> > > Thanks, 
> > > 
> > > Pam 
> > > 
> > > 
> > > -- 
> > > To unsubscribe, e-mail: 
> > > < mailto:struts-user-unsubscribe@jakarta.apache.org > 
> > > For additional commands, e-mail: 
> > > < mailto:struts-user-help@jakarta.apache.org > 
> > > 
> > > 
> > 
> > -- 
> > To unsubscribe, e-mail: 
> > < mailto:struts-user-unsubscribe@jakarta.apache.org > 
> > For additional commands, e-mail: 
> > < mailto:struts-user-help@jakarta.apache.org > 
> > 
> > -- 
> > To unsubscribe, e-mail: 
> > < mailto:struts-user-unsubscribe@jakarta.apache.org > 
> > For additional commands, e-mail: 
> > < mailto:struts-user-help@jakarta.apache.org > 
> > 
> > 
> 
> -- 
> To unsubscribe, e-mail: 
> < mailto:struts-user-unsubscribe@jakarta.apache.org > 
> For additional commands, e-mail: 
> < mailto:struts-user-help@jakarta.apache.org > 
> 
> -- 
> To unsubscribe, e-mail: 
< mailto:struts-user-unsubscribe@jakarta.apache.org > 
For additional commands, e-mail: 
< mailto:struts-user-help@jakarta.apache.org > 



-- 
To unsubscribe, e-mail: 
< mailto:struts-user-unsubscribe@jakarta.apache.org > 
For additional commands, e-mail: 
< mailto:struts-user-help@jakarta.apache.org > 

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message