Taken from James Turner's mail: ApplicationConfig appConfig = (ApplicationConfig)request.getAttribute(Action.APPLICATION_KEY);
FormBeanConfig formBeanConfig = appConfig.findFormBeanConfig("myDynaActionForm"); String beanType = formBeanConfig.getType(); DynaActionForm bean; DynaActionFormClass formClass = DynaActionFormClass.createDynaActionFormClass(formBeanConfig); bean = (DynaActionForm) formClass.newInstance(); request.setAttribute("myDynaActionForm", bean); ----- Original Message ----- From: "Gemes Tibor" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <[EMAIL PROTECTED]> Sent: Tuesday, November 19, 2002 11:33 AM Subject: Re: Initialization of DynaValidatorForm 2002. november 19. 10:25 dátummal Bas Passon ezt írtad: > Hi, > > Does anyone know how to retrieve a dyna form bean before the request to > the corresponding action is made. I would like to set some initial values > for the form. I noticed it can be done from the struts-config.xml, but > that option is not flexible enough since the initial values depend on the > requests a user made already. > > Anyone got a solution for this problem which uses dyna form beans, or is > the only option to create custom formbeans? Hey man, it's in the docs. Create an action wich prepopulates your form. hth, Tib -- 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]>