No problem. I've already searched the archives. I think I'm getting close to the answer by looking at the source code. I will post the solution soon.
JOHN -----Original Message----- From: Jerry Jalenak [mailto:[EMAIL PROTECTED]] Sent: Friday, September 27, 2002 2:17 PM To: Hohlen, John Subject: RE: HELP!: Pre-populating A DynaValidatorForm in Struts 1.1 B2 I've seen answers to similar questions on this list before; unfortunately (fortunately?) I've not had to instantiate a DynaFormBean on my own yet. I hate to tell you to search the archives, but that might be the best place to start..... Sorry I couldn't be of more help :-( Jerry > -----Original Message----- > From: Hohlen, John [mailto:[EMAIL PROTECTED]] > Sent: Friday, September 27, 2002 2:07 PM > To: 'Struts Users Mailing List' > Cc: '[EMAIL PROTECTED]' > Subject: RE: HELP!: Pre-populating A DynaValidatorForm in > Struts 1.1 B2 > > > My bad! > > I grabbed the wrong sniplet of code. It's Friday, can you > tell? Here's > what I have in my struts-config.xml file: > > <form-bean> > name="employeeForm" > dynamic="true" > type="org.apache.struts.validator.DynaValidatorForm"> > <form-property name="emailAddress" > type="java.lang.String"/> > <form-property name="anniversaryDate" > type="java.lang.String"/> > </form-bean> > > Nonetheless, does it make sense what I'm trying to do? > > JOHN > > -----Original Message----- > From: Jerry Jalenak [mailto:[EMAIL PROTECTED]] > Sent: Friday, September 27, 2002 2:03 PM > To: 'Struts Users Mailing List' > Subject: RE: HELP!: Pre-populating A DynaValidatorForm in > Struts 1.1 B2 > > > I think you are confused. > > You still need to declare your <form-bean> in struts-config.xml using > 'type='org.apache.struts.validator.DynaValidatorForm'. In your > validation.xml the <form-set>....</form-set> is used by validator to > identify the properties from your <form-bean> so that > validator will know > what kind of validation to perform. Struts, as far as I > know, will NOT > instantiate anythiing simply by being in the validation.xml file..... > > Jerry > > > -----Original Message----- > > From: Hohlen, John [mailto:[EMAIL PROTECTED]] > > Sent: Friday, September 27, 2002 1:54 PM > > To: Struts-Help (E-mail) > > Subject: HELP!: Pre-populating A DynaValidatorForm in Struts 1.1 B2 > > > > > > Does anyone know how to instantiate a "DynaValidatorForm" > > declared in the > > "validation.xml" file within Java code? > > > > <formset> > > <form name="employeeForm"> > > <field property="emailAddress" > > depends="required,email"> > > <arg0 key="general.emailAddress"/> > > </field> > > <field property="anniversaryDate" > > depends="required,date"> > > <arg0 key="general.anniversaryDate"/> > > <var> > > <var-name>datePatternStrict</var-name> > > <var-value>MM/dd/yyyy</var-value> > > </var> > > </field> > > </form> > > </formset> > > > > More specifically, I want this form, used by my JSP, to contain > > pre-populated data from the database. Therefore, it is > > desired to have my > > action to instantiate the form bean and pre-populate it -- > > versus letting > > the Struts framework create one with default values. In > > Struts 1.0, I just > > did the following in my action: > > > > EmployeeForm employeeForm = new EmployeeForm(); > > > > But this won't work using dyna forms in Struts 1.1 since there is no > > "EmployeeForm" Java class. > > > > Thanks! > > > > > > -- > > To unsubscribe, e-mail: > > <mailto:[EMAIL PROTECTED]> > > For additional commands, e-mail: > > <mailto:[EMAIL PROTECTED]> > > > > > > This transmission (and any information attached to it) may be > confidential > and is intended solely for the use of the individual or > entity to which it > is addressed. If you are not the intended recipient or the person > responsible for delivering the transmission to the intended > recipient, be > advised that you have received this transmission in error and > that any use, > dissemination, forwarding, printing, or copying of this information is > strictly prohibited. If you have received this transmission > in error, please > immediately notify LabOne at (800)388-4675. > > > > -- > To unsubscribe, e-mail: > <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: > <mailto:[EMAIL PROTECTED]> > This transmission (and any information attached to it) may be confidential and is intended solely for the use of the individual or entity to which it is addressed. If you are not the intended recipient or the person responsible for delivering the transmission to the intended recipient, be advised that you have received this transmission in error and that any use, dissemination, forwarding, printing, or copying of this information is strictly prohibited. If you have received this transmission in error, please immediately notify LabOne at (800)388-4675. -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

