Probably because struts needs to know which variables are properties and which are just implementation details that shouldn't be exposed.
David >From: [EMAIL PROTECTED] >Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]> >To: <[EMAIL PROTECTED]> >Subject: Why add form-property to struts-config.xml for DynaActionForms >Date: Thu, 10 Oct 2002 19:21:43 +0100 > >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: ><mailto:[EMAIL PROTECTED]> >For additional commands, e-mail: ><mailto:[EMAIL PROTECTED]> _________________________________________________________________ Chat with friends online, try MSN Messenger: http://messenger.msn.com -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>