On Tue, 23 Jul 2002, Matt Raible wrote:

> Date: Tue, 23 Jul 2002 07:15:33 -0700 (PDT)
> From: Matt Raible <[EMAIL PROTECTED]>
> Reply-To: Struts Developers List <[EMAIL PROTECTED]>,
>      [EMAIL PROTECTED]
> To: Struts Developers List <[EMAIL PROTECTED]>
> Subject: Re: NPE when setting values on DynaActionForm
>
> The call below results in:
>
>     [javac]                                        <-------------
>     [javac]     85.                 DynaActionForm requestForm =
>     [javac]     86.
> DynaActionFormClass.getDynaActionFormClass("requestForm").newInstance();
>     [javac]
> 
>------------------------------------------------------------------------------------------>
>     [javac] *** Error: The type of the left-hand side in this assignment,
> "org/apache/struts/action/DynaActionForm", is
> not compatible with the type of the right-hand side expression,
> "org/apache/commons/beanutils/DynaBean".
>
> BUILD FAILED
>
> However, this seems to work:
>
> DynaActionForm requestForm = (DynaActionForm)
>     DynaActionFormClass.getDynaActionFormClass("requestForm").newInstance();
>

You're right ... you do need the cast.  Sorry about that -- all I can do
is plead "late night" ...

Craig


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

Reply via email to