The problem is the view property of the DynaActionForm is Object type. Is it a valid type? I checked struts online documentation which lists a couple of valid types but it does not include java.lang.Object!
In a DynaActionForm, as with any ActionForm, properties can be Strings, Booleans, or an object whose properties are strings or booleans. Other types such as Integer and Date will work if all you're doing is outputting them, but if they're being used on input controls, you can run into problems with validation.
If you do not supply an initial attribute, numbers will be initialized to 0 and objects to null.
Joined: Jan 28, 2004
I mean the list doesnt include java.lang.Object. I suppose that is a list of ALL supported types - those not listed are NOT supported.
Joined: Feb 15, 2005
The mechanism behind the DynaActionForm is just a java.util.Map, so really, you can store any object type you wish in a property. I'm not sure why they even make a list of officially supported objects.
It's quite often convenient to nest other objects in your form bean, and use the properties of those objects to display data.
Read the following from the official struts website, and I think you'll understand better why it's OK to put user defined objects in a form.