Re: [Webwork-devel] Sessionable Actions
                
                Brought to you by:
                
                    baldree,
                    
                
                    rickardoberg
                    
                
            
            
        
        
        
    | 
      
      
      From: Rickard O. <ri...@xp...> - 2001-11-28 21:23:33
      
     | 
| Jason Carreira wrote: > I was reading the "Strutting Your Stuff" article in the latest Java > Developers Journal about, of course, Struts, and saw an idea in Struts that > I thought we should steal.... umm, borrow. Basically, the idea was that the > Actions would be saved in the session and reused on the next request. <snip> Hm.. I'm not sure this is the way you'd want to do it. First of all I can see problems with this and the ClientServletDispatcher, where the action is being sent back and forth between clients and server. Second, why put the action itself into the session? Why not put a wizard object representation into the session? It should be simpler to just do that, and then extract it using a utility class, or a utility action. About double-submitting, that should be easily solved by using timestamps. I.e. in each form you include a number that is increased for each submit. In the action you compare the number received with the current number in the wizard object from the session. If its valid, then go ahead, but if its not, then return an error. That should always work. /Rickard -- Rickard Öberg |