Subject: Re: Problems with FormBeans From: Maurice Mills <[EMAIL PROTECTED]> === Actually, the problem was that I had code in the reset method that cleared out the FormBean's attributes. When I removed the code, it started working.
This brings up a new question. Why would you put anything in the reset method. Wouldn't you want the FormBean to stick around as it was when the form was built so it is there when the form is submitted? Bill Boland wrote: > The default scope is "session" (at least on Struts 1.1b1) so unless you > specify it as "request", it is a session scope form bean. > > But...it may be that you are creating a new session on each request (if > cookies are turned off and/or you are not URL rewriting when the form is > submitted, etc.) You might want to redirect to a "snoop" JSP or Servlet > that lists the attribute of the application, session and requests scopes > along with the session and cookie information. Just an idea...it's > happened to me! > > bill > > -----Original Message----- > From: Trieu, Danny [mailto:[EMAIL PROTECTED]] > Sent: Thursday, May 09, 2002 2:28 PM > To: 'Struts Users Mailing List' > Subject: RE: Problems with FormBeans > > It is depend on what scope you specified for you from bean in the action > mapping. My guess is you didn't specify the scope to be session, so > when > your action get submitted the controller look for the bean in the > specified > session( in this case it is not the session scope) and it doesn't find > it > there so it create one for you. > > > -----Original Message----- > > From: Struts Newsgroup [SMTP:[EMAIL PROTECTED]] > > Sent: Thursday, May 09, 2002 2:10 PM > > To: [EMAIL PROTECTED] > > Subject: Problems with FormBeans > > > > Subject: Problems with FormBeans > > From: Maurice Mills <[EMAIL PROTECTED]> > > === > > I am having a problem with my struts forms. > > > > I call an Action class to load a FormBean and put it in the session. > > The bean is used to load the values on the form correctly. > > > > The problem occurs when the form is submitted. > > > > Instead of using the bean in the session, the RequestProcessor is > > creating a new one. I see the constructor of my FormBean being > called. > > > > Should it be using the one in the session, or creating a new one every > > time? If the session bean is to be used, how do I make this work? If > > not, how do I deal with nested lists of attributes of unknown length? > > > > Thanks, > > Maury > > > > > > > > > > -- > > To unsubscribe, e-mail: > > <mailto:[EMAIL PROTECTED]> > > For additional commands, e-mail: > > <mailto:[EMAIL PROTECTED]> > > -- > To unsubscribe, e-mail: > <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: > <mailto:[EMAIL PROTECTED]> > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

