Do you mean what Dan has been talking about, persisting a form bean
across multiple requests?
 
Doh!  Bart!  I just sat down to write a simple example and realized that
makeFormBean() doesn't have enough parameters.  Sorry about that :-)
 
It has been corrected in CVS.  Here is an example of using it:
 
You would have two instances of the FormBeanUser class.  The only real
difference (besides any application logic you want to put in your
performSimple() methods) is the makeFormBean() method.  The first one
would be like this:
 
protected Object makeFormBean(HttpServletRequest request,
HttpServletResponse response, ServletConfig servletCfg)
{
    Object bean = new MyFormBean();
    request.getSession().setAttribute("theBean", bean);
    return bean;
}
 
The second one would be like this:
 
protected Object makeFormBean(HttpServletRequest request,
HttpServletResponse response, ServletConfig servletCfg)
{
    Object bean = request.getSession().getAttribute("theBean");
    if (bean == null)
        bean = new MyFormBean();
 
    return bean;
}
 
Does that clear it up?
 
Jeff Schnitzer
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> 
 

        -----Original Message----- 
        From: Roman V. Petrov 
        Sent: Wed 4/17/2002 9:48 AM 
        To: maverick 
        Cc: 
        Subject: [Mav-user] Form bean implementation
        
        

        Could anybody post an example of request/session struts-like
form bean
        implementation with Maverick 2.0?
        
                             Sincerely yours, Roman Petrov
        
        </></></></></></></></></></></></></></></></></></></></>
        Software Engineer                    Actimind, Inc.
        Software Development Department      http://www.actimind.com
        E-mail: [EMAIL PROTECTED]            Saint-Petersburg, Russia
        
        
        _______________________________________________
        Mav-user mailing list
        [EMAIL PROTECTED]
        https://lists.sourceforge.net/lists/listinfo/mav-user
        

<<winmail.dat>>

Reply via email to