You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Pr...@ubsw.com on 2002/10/10 20:21:43 UTC

Why add form-property to struts-config.xml for DynaActionForms

Is it possible to avoid adding <form-property> tags to struts-config.xml for DynaActionForms? Struts complains if these aren't provided.

For example, if I have a form with fields called username, password, currencyList and activityStatus, I have to add the following to struts-config.xml


        <form-bean name="test1Form" type="org.apache.struts.webapp.example.Test1Form" dynamic="true">
          <form-property name="username" type="java.lang.String" />
          <form-property name="password" type="java.lang.String" />
          <form-property name="currencyList" type="java.util.List" />
          <form-property name="activityStatus" type="java.lang.String" />
        </form-bean>

Why is this necessary since there are no corresponding get/set methods for each field in a DynaActionForm? For example, there are no methods called getUsername() or setUsername(). Instead the DynaActionForm's generic getter method is called: public Object get(String parm1).

Is there a way of avoiding this?

TIA

Praful
 

Visit our website at http://www.ubswarburg.com

This message contains confidential information and is intended only 
for the individual named.  If you are not the named addressee you 
should not disseminate, distribute or copy this e-mail.  Please 
notify the sender immediately by e-mail if you have received this 
e-mail by mistake and delete this e-mail from your system.

E-mail transmission cannot be guaranteed to be secure or error-free 
as information could be intercepted, corrupted, lost, destroyed, 
arrive late or incomplete, or contain viruses.  The sender therefore 
does not accept liability for any errors or omissions in the contents 
of this message which arise as a result of e-mail transmission.  If 
verification is required please request a hard-copy version.  This 
message is provided for informational purposes and should not be 
construed as a solicitation or offer to buy or sell any securities or 
related financial instruments.


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>