Pankaj Sharma - 2008-04-25

Hi
I am using STC to test my struts Application the Problem is after setting manually the instance of the DyanActionForm the execute method in the action class never gets executed.

DynaValidatorActionForm dform = null;
FlowType flowTypeObject = new FlowType();
flowTypeObject.setNewUser(true);
FormBeanConfig formBeanConfig = new FormBeanConfig(); 
formBeanConfig.setName("registrationForm"); 
formBeanConfig.setType("org.apache.struts.validator.DynaValidatorActionForm"); 
formBeanConfig.addFormPropertyConfig(new FormPropertyConfig("flowTypeObject", "com.freeserve.sus.broadband.util.beans.FlowType", null)); 

DynaActionFormClass obj = DynaActionFormClass.createDynaActionFormClass(formBeanConfig);

try {
dform = (DynaValidatorActionForm)obj.newInstance();
dform.getMap().put("flowTypeObject", flowTypeObject); 
dform.set("flowTypeObject", flowTypeObject);
} catch (IllegalAccessException e) {
e.printStackTrace();
} catch (InstantiationException e) {
e.printStackTrace();

setRequestPathInfo("/backAccountSuggestionOrNot");
setActionForm(dform);
actionPerform();

Can anyone please tell what am I missing.

Thanks