struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Frederico Schuh <>
Subject DynaActionForm problem with non-string objects
Date Fri, 19 Apr 2002 14:38:52 GMT
I'm using some DynaActionForms, but some of them
require more complex objects with nested fields, and
not only Strings as fields.
The problem is that I can only seem to set my objects
as null, and it causes problems in the JSPs.
Consider this example, taken from struts-config.xml:

        <form-property name="myObject"
type="vo.MyObject" />

I could not use the "initial" property of the
form-property element because my object is not a
String. So it is set to null instead.
All I want is a new instance of the object to be
created as the field's initial value.
I could set a newly allocated object to the Dynamic
form myself, but it sounds like a rather crude
solution to me. 
Isn't there a better way to do this, or will I have to
extend the DynaActionForm class to solve this issue?

Frederico Ferro Schuh
ICQ: 20486081

Yahoo! Empregos
O trabalho dos seus sonhos pode estar aqui. Cadastre-se hoje mesmo no Yahoo! Empregos e tenha
acesso a milhares de vagas abertas!

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message