You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by Ed Milic <ed...@hotmail.com> on 2003/02/03 20:34:17 UTC

DynaActionForm initial values

Hi,

I have been scratching my head wondering why you can only specify static 
initial values in a form bean definition in the struts-config.xml.  To 
illustrate:

<form-bean name="SomeForm" "org.apache.struts.validator.DynaActionForm">
    <form-property name="field1" type="java.lang.String" 
initial="someInitialValue"/>
</form-bean>

It would be nice from a localization standpoint to have the initial
value represent a key in a resource file (say the default MessageResources) 
and initialize the field based on this along with the user's locale.

I actually decided to implement this myself for the convenience it offers.  
I can provide the code changes (very minor ones at that) if anyone wants to 
add it to the struts code base.

Cheers,
Ed

_________________________________________________________________
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.  
http://join.msn.com/?page=features/virus


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