At 03:19 PM 9/27/2002, you wrote:
>From: Jerry Jalenak [mailto:[EMAIL PROTECTED]]
>Sent: Friday, September 27, 2002 2:17 PM
>To: Hohlen, John
>Subject: RE: HELP!: Pre-populating A DynaValidatorForm in Struts 1.1 B2
>
>
>I've seen answers to similar questions on this list before; unfortunately
>(fortunately?) I've not had to instantiate a DynaFormBean on my own yet.  I
>hate to tell you to search the archives, but that might be the best place to
>start.....
>
>Sorry I couldn't be of more help :-(
>
>Jerry

I posted the solution to this yesterday, I'll restate:

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);


James



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

Reply via email to