struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Richard Yee <rye...@yahoo.com>
Subject Re: initialize dynaform
Date Mon, 14 Nov 2005 21:10:15 GMT
Fea,
To initialize a dynaform staticly, do as Niall
suggested. To dynamically pre-populate a dynaform, you
need code to do it as follows:

    ModuleConfig moduleConfig =
RequestUtils.getModuleConfig(request,
getServlet().getServletContext());
    FormBeanConfig formConfig = 
           
moduleConfig.findFormBeanConfig("your_form_name");
    DynaActionFormClass dynaClass =
           
DynaActionFormClass.createDynaActionFormClass(formConfig);
        
    try {
      myForm = (DynaActionForm)
dynaClass.newInstance();
    }
    catch (Exception e) {
      logger.error(e);
    }


Regards,

Richard


--- fea jabi <zyxrm@hotmail.com> wrote:

> Is it possible to initialize dynaform?
> 
> and how can this be done?
> 
> Thanks.
> 
>
_________________________________________________________________
> Express yourself instantly with MSN Messenger!
> Download today - it's FREE! 
>
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@struts.apache.org
> For additional commands, e-mail:
> user-help@struts.apache.org
> 
> 



		
__________________________________ 
Start your day with Yahoo! - Make it your home page! 
http://www.yahoo.com/r/hs

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


Mime
View raw message