Up to ValidatorFAQ


What's the difference between DynaValidatorForms and DynaValidatorActionForms?

When you configure your forms to be DynaValidatorForms, then struts will choose to use the form you defined in validation.xml with the same name as the action mapping's name attribute. This should also correspond to a form definition in the struts-config form-beans section.

With DynaActionValidatorForms, struts looks for a form definition in validation.xml with the name the same as the path attribute of your action mapping.

i.e. with DynaValidatorForms you always get the same validation done on a particular struts-config-defined formbean.

With DynaValidatorActionForms any particular validation definition in validation.xml is executed for a particular URL, the path in the action mapping.


Commants for 4.3.2 Map-backed ActionForms See: http://struts.apache.org/userGuide/building_controller.html#map_action_form_classes

I miss the corresponding struts config bits. the word 'class' is missing in line:
'public FooForm extends ActionForm {'


How to generate a serialVersionUID

The java sdk provides a command line tool to generate serialVersionUID's for classes. Change to the top level directory for the package containing your class and enter the following shell command:

serialver -classpath "./:/path/to/lib/struts-core-x.x.x.jar:/path/to/lib/javax.servlet.jar" com.domain.package.Classname

Note:

/path/to/lib/ = path to your jar files

com.domain.package.Classname = fully qualified class name


Up to ValidatorFAQ

Hi everybody... I'm working with DynaActionForms, because is cool to do not create an Form class for each Form. But what about if I want to 'extend' my form definition, yes, is like if this Form is instanceof MyDynaActionForm so add all this properties to the internal Map. I was looking for... and i found that you can add new properties or FormPropertyConfig to the FormBeanConfig before it come to be freeze. You can do this with a PlugIn, just put the instanceof validation and add the new properties with the addFormPropertyConfig() method, yes you can debug it and you will see that the internal Map is growing, but when you go into you execute method on the Action class and read the size of the internal Map of properties, you will see that all the properties are not there... why? I dont know... Do some body know why?... Thks. and sorry for my bad english.

  • No labels