On Mon, 6 Jan 2003, Matt Raible wrote:

> Date: Mon, 6 Jan 2003 20:52:22 -0700
> From: Matt Raible <[EMAIL PROTECTED]>
> Reply-To: Struts Developers List <[EMAIL PROTECTED]>
> To: 'Struts Developers List' <[EMAIL PROTECTED]>
> Subject: RE: DynaActionFormClass.getDynaActionFormClass
>
> After looking at this method, I don't know that it will work for me:
>
> createActionForm(javax.servlet.http.HttpServletRequest request,
>       ActionMapping mapping, ModuleConfig moduleConfig, ActionServlet
> servlet)
>
> My form is not associated with a particular mapping, as I'm creating it
> on the fly and using it to send an e-mail message.  There's got to be an
> easy way to do this - any examples?
>

If it's not really a form bean, why are you trying to use the form bean
machinery?  I'd go suggest using something like BasicDynaClass (in
org.apache.commons.beanutils) instead.  The Javadocs for commons-beanutils
have info about this class and the others -- see the package description.

http://jakarta.apache.org/commons/beanutils/api/

> How do I get the mapping if the form is not associated with any actions
> - or even if it is?
>
> This was working great for me in 1.1b2:
>
> DynaActionForm requestForm = (DynaActionForm) DynaActionFormClass
>       .getDynaActionFormClass(Constants.REQUEST_KEY).newInstance();
>

Try putting the 1.1-b2 struts.jar file in your container's shared
directory, and then deploy two different webapps that have a form bean
(with different properties) of the same name.  You'll find out very
quickly why this method was yanked.

> But now it's gone :(  I'd love a quick HowTo for writing this same logic
> with Struts 1.1 b3.
>
> Thanks,
>
> Matt

Craig


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

Reply via email to