struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "fea jabi" <zy...@hotmail.com>
Subject Re: No getter method servlet Exception. using DynaActionForm
Date Wed, 16 Nov 2005 15:55:27 GMT
DynaActionForm setupForm = (DynaActionForm) form;


ModuleConfig moduleConfig =
>>>RequestUtils.getModuleConfig(request,
>>>getServlet().getServletContext());
>>>         FormBeanConfig formConfig =
>>>moduleConfig.findFormBeanConfig("CustForm");
>>>         DynaActionFormClass dynaClass =
>>>DynaActionFormClass.createDynaActionFormClass(formConfig);
>>>
>>>         try {
>>>             setupForm = (DynaActionForm)dynaClass.newInstance();


When I debug after
DynaActionForm setupForm = (DynaActionForm) form;

my setupForm is null

I am not sure when the below has to be used?

ModuleConfig moduleConfig =
>>>RequestUtils.getModuleConfig(request,
>>>getServlet().getServletContext());
>>>         FormBeanConfig formConfig =
>>>moduleConfig.findFormBeanConfig("CustForm");
>>>         DynaActionFormClass dynaClass =
>>>DynaActionFormClass.createDynaActionFormClass(formConfig);
>>>
>>>         try {
>>>             setupForm = (DynaActionForm)dynaClass.newInstance();

one of the user suggested that when I initialize a form-property in 
struts-config using initial="true"
I have to use the above to prepopulate the form.

is this right?? Am I using at the right place.

I am new to DynaFormBeans.



>From: Dave Newton <newton@pingsite.com>
>Reply-To: "Struts Users Mailing List" <user@struts.apache.org>
>To: Struts Users Mailing List <user@struts.apache.org>
>Subject: Re: No getter method servlet Exception. using DynaActionForm
>Date: Wed, 16 Nov 2005 10:48:45 -0500
>
>fea jabi wrote:
>
>>>         DynaActionForm setupForm = (DynaActionForm) form;
>>>
>>>         ModuleConfig moduleConfig = 
>>>RequestUtils.getModuleConfig(request,
>>>getServlet().getServletContext());
>>>         FormBeanConfig formConfig =
>>>moduleConfig.findFormBeanConfig("CustForm");
>>>         DynaActionFormClass dynaClass =
>>>DynaActionFormClass.createDynaActionFormClass(formConfig);
>>>
>>>         try {
>>>             setupForm = (DynaActionForm)dynaClass.newInstance();
>>
>Why do you do this?
>
>There's a mismatch between what you have in the config file and what you're 
>doing here, which seems totally inexplicable. I thought that custom form 
>stuff should occur in a custom request processor anyway.
>
>Dave
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>For additional commands, e-mail: user-help@struts.apache.org
>

_________________________________________________________________
Donít just search. Find. Check out the new MSN Search! 
http://search.msn.click-url.com/go/onm00200636ave/direct/01/


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


Mime
View raw message