struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Validator problem (or user problem... not sure which yet)
Date Wed, 19 Jun 2002 19:23:43 GMT

As I feared I am having trouble with the same spot I was having before:
I have the DynaActionForm working well enough.  It passes through to the 
action fine, and all my data appears to be there.

However, when I try to do validation with it by declaring my form bean 
as org.apache.struts.validator.DynaValidatorForm or 
DynaValidatorActionForm it does absolutely nothing validation wise.  It 
cruises right through to my action...

Here is what my struts-config.xml looks like:

<form-bean name="formNewRequest" 
<set-property property="dynamic" value="true" /><form-property 
name="employeeFirstName" type="java.lang.String" initial="" 
/><form-property name="employeeLastName" type="java.lang.String" 
initial="" /><form-property name="contactInfo" type="java.lang.String" 
initial="" /><form-property name="vendorCompanyName" 
type="java.lang.String" initial="" /><form-property 
name="vendorEmployeeName" type="java.lang.String" initial="" 
/><form-property name="startDate" type="java.lang.String" initial="" 
/><form-property name="endDate" type="java.lang.String" initial="" 
/><form-property name="campus" type="java.lang.String" 
initial="Simsbury" /><form-property name="accessAreas" 
type="java.lang.String" initial="" /><form-property name="notes" 
type="java.lang.String" initial="" /></form-bean>

<action path="/createNew" parameter="" 
type="com.ebind.plantsec.create.actionCreateNew" name="formNewRequest" 
input="" scope="request"><forward name="continue" 
path="" redirect="false" /><forward name="success" 
path="plantsec.mainmenu" redirect="false" /></action>


My validator.xml looks like so:

   <form name="formNewRequest">
         <field property="employeeFirstName"
         	     <arg0 key="registrationForm.firstname.displayname"/>


-----Original Message-----
From: william.wws []
Sent: Wednesday, June 19, 2002 1:56 PM
To: struts-user
Subject: Re: Validator problem (or user problem... not sure which yet)

Why don't you use DynaActionForm ? I don't have problem to use the 
with DynaActionForms !

>Reply-To: "Struts Users Mailing List" <>
>Subject: Validator problem (or user problem... not sure which yet)
>Date: Wed, 19 Jun 2002 13:42:49 -0400
>I am having trouble getting validator to work under 1.1b (I never used
>it before).
>I have the plug in defined, I have the validator.xml set up with my 
>name like so:
><form  name="formNewRequest">
>  <field    property="value(employeeFirstName)"
>    	  depends="required">
>          	     <arg0 
>Notice the property?  Can I do this?  My bean has a setValue( ) and
>getValue( ) method that I work with.
>The result of this is nothing.  It returns back to the form page, but
>that could be because of my normal validate routine
>The other strange thing is that although it calls my validate method in
>my formbean any error messages disappear off into the bit bucket...
>Should I just migrate to dynaforms?  Would that be best?
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 

Chat with friends online, try MSN Messenger:

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

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

View raw message