Erik,
i'm not talking about form attributes, that's what i
said in my last e-mail.
I'll try to clear it out.
Suppose a user submits a request that is handled by
MyActionDoSomething. Then this action sets a request
attribute like this:

request.setAttribute("MyObject", obj); 

and forwards the request to the page
myPageDoSomeOtherThing.jsp, wich has some inputs for
the user to fill in.
This page (myPageDoSomeOtherThing.jsp) uses the bean
"obj" that was set in MyActionDoSomething.java ok !?

Now suppose the user submits wrong information in
myPageDoSomeOtherThing.jsp, what will cause the
validate method in the associated ActionForm to return
some ActionErrors. BUT when the ActionForm send this
page back for the user to re-input data, the bean
"obj" that was set at the very beginning in
MyActionDoSomething.java is NOT present anymore!

I think now it's clear that i'm not talking about the
formBean attributes, right !? 








 --- Erik Weber <[EMAIL PROTECTED]> escreveu: 
> You shouldn't have to do anything (in general, you
> rarely need to 
> implement reset) special for this. Struts does this
> for you. The user 
> submits the form. The form bean is populated with
> the user's input. 
> Validation starts on the form bean. Validation
> fails. Struts forwards 
> back to the input page, and the struts tags render
> all the values that 
> the user had input using the populated form bean.
> 
> Could you describe in more detail which types of
> form values seem to be 
> "missing" and which ones are intact? Is there a
> pattern to it?
> 
> Erik
> 
> 
> 
> Leandro Melo wrote:
> 
> >I don`t want to reset the attributes of my
> ActionForm
> >(what a form.reset() would do), BUT the attributes
> of
> >the request the were probably set by the Action
> that
> >forwarded to the specific page.
> >
> >So i need them back in that page if validate fails.
> >
> >
> > --- Robert Taylor <[EMAIL PROTECTED]> escreveu:
> 
> >  
> >
> >>form.reset();
> >>
> >>robert
> >>
> >>    
> >>
> >>>-----Original Message-----
> >>>From: Leandro Melo
> >>>      
> >>>
> >>[mailto:[EMAIL PROTECTED]
> >>    
> >>
> >>>Sent: Friday, August 13, 2004 11:20 AM
> >>>To: Struts Users Mailing List
> >>>Subject: Re: Loosing request attributes
> >>>
> >>>
> >>>I was taking a look at the HttpServeltRequest and
> >>>ServletRequest apis and noted that theres a
> method
> >>>"getParameterMap()" wich returns a map of the
> >>>parameters, BUT there isn`t such a
> >>>      
> >>>
> >>"setParameterMap()"
> >>    
> >>
> >>>method.
> >>>
> >>>So, what`s an automated way to re-set all my
> >>>      
> >>>
> >>request
> >>    
> >>
> >>>parameters in the ActionForm??? Do i have to go
> >>>      
> >>>
> >>one by
> >>    
> >>
> >>>one for each ActionForm :-( ???
> >>>
> >>>
> >>> --- "Ruth, Brice" <[EMAIL PROTECTED]> escreveu:
> >>>      
> >>>
> >>>>Ensure that the request attributes are set in
> >>>>        
> >>>>
> >>the
> >>    
> >>
> >>>>ActionForm, this is
> >>>>the only way that you can ensure that they'll
> >>>>        
> >>>>
> >>still
> >>    
> >>
> >>>>be there when the
> >>>>validate fails.
> >>>>
> >>>>Leandro Melo wrote:
> >>>>
> >>>>        
> >>>>
> >>>>>Hi,
> >>>>>when a user request hits the ActionForm's
> >>>>>          
> >>>>>
> >>validate
> >>    
> >>
> >>>>>method and bounces back, i'm loosing some
> >>>>>          
> >>>>>
> >>request
> >>    
> >>
> >>>>>attributes that i had set for the page. In
> >>>>>          
> >>>>>
> >>other
> >>    
> >>
> >>>>>words, if the user inputs some data that don't
> >>>>>          
> >>>>>
> >>pass
> >>    
> >>
> >>>>>the validate method,
> >>>>>the page comes back with a few request scope
> >>>>>attributes missing.
> >>>>>
> >>>>>Is there a way to avoid that this happens?
> >>>>>
> >>>>>=====
> >>>>>_________________________________
> >>>>>Leandro Terra C. Melo
> >>>>>Eng. de Controle e Automação - UFMG
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>          
> >>>>>
>
>>_______________________________________________________
> >>    
> >>
> >>>>>Yahoo! Acesso Grátis - navegue de graça com
> >>>>>          
> >>>>>
> >>conexão
> >>    
> >>
> >>>>de qualidade! Acesse:
> >>>>        
> >>>>
> >>http://br.acesso.yahoo.com/
> >>    
> >>
>
>>---------------------------------------------------------------------
> >>    
> >>
> >>>>>To unsubscribe, e-mail:
> >>>>>          
> >>>>>
> >>>>[EMAIL PROTECTED]
> >>>>        
> >>>>
> >>>>>For additional commands, e-mail:
> >>>>>          
> >>>>>
> >>>>[EMAIL PROTECTED]
> >>>>        
> >>>>
> >>>>>
> >>>>>          
> >>>>>
> >>>>--
> >>>>Brice Ruth, Sr. IT Analyst
> >>>>Fiskars Brands Inc
> >>>>http://www.fiskarsbrands.com/
> >>>>
> >>>>
> >>>>
> >>>>        
> >>>>
>
>---------------------------------------------------------------------
> >  
> >
> >>>>To unsubscribe, e-mail:
> >>>>[EMAIL PROTECTED]
> >>>>For additional commands, e-mail:
> >>>>[EMAIL PROTECTED]
> >>>>
> >>>>
> >>>>        
> >>>>
> 
=== message truncated === 

=====



        
        
                
_______________________________________________________
Yahoo! Acesso Grátis - navegue de graça com conexão de qualidade! Acesse: 
http://br.acesso.yahoo.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to