struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William W" <william_...@hotmail.com>
Subject RE: Validator problem (or user problem... not sure which yet)
Date Wed, 19 Jun 2002 19:48:03 GMT
Don't forget the validate="true" in the action mapping.
Like this
<action path="/createNew" parameter="method"
type="com.ebind.plantsec.create.actionCreateNew" name="formNewRequest"
input="plantsec.create.new" scope="request" validate="true">
<forward name="continue" path="plantsec.create.new" redirect="false" />
<forward name="success"path="plantsec.mainmenu" redirect="false" />
</action>

Are you using DispatchAction ? If true, why your parameter don't have value 
?

William.

>From: wbchmura@Ensign-BickfordInd.com
>Reply-To: "Struts Users Mailing List" <struts-user@jakarta.apache.org>
>To: struts-user@jakarta.apache.org
>Subject: RE: Validator problem (or user problem... not sure which yet)
>Date: Wed, 19 Jun 2002 15:46:39 -0400
>
>
>tried that... Still ignoring me...
>
>
>-----Original Message-----
>From: william.wws [mailto:william_wws@hotmail.com]
>Sent: Wednesday, June 19, 2002 3:21 PM
>To: struts-user
>Subject: Re: Validator problem (or user problem... not sure which yet)
>
>
>
>Try to do something like this
>
><form-bean name="myForm" dynamic="true"
>type="org.apache.struts.validator.DynaValidatorForm">
>
>Don't forget the dynamic="true"
>
>William.
>
>
> >From: wbchmura@Ensign-BickfordInd.com
> >Reply-To: "Struts Users Mailing List" <struts-user@jakarta.apache.org>
> >To: struts-user@jakarta.apache.org
> >Subject: Validator problem (or user problem... not sure which yet)
> >Date: Wed, 19 Jun 2002 15:23:43 -0400
> >
> >
> >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"
> >type="org.apache.struts.validator.DynaValidatorActionForm">
> ><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="plantsec.create.new" scope="request"><forward name="continue"
> >path="plantsec.create.new" redirect="false" /><forward name="success"
> >path="plantsec.mainmenu" redirect="false" /></action>
> >
> >----------------------------------------------
> >
> >My validator.xml looks like so:
> >
> >    <formset>
> >    <form name="formNewRequest">
> >          <field property="employeeFirstName"
> >          	   depends="required">
> >          	     <arg0
>key="registrationForm.firstname.displayname"/>
> >          </field>
> >     </form>
> >     </formset>
> >
> >-
> >
> >
> >
> >-----Original Message-----
> >From: william.wws [mailto:william_wws@hotmail.com]
> >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
> >validate
> >with DynaActionForms !
> >William.
> >
> > >From: wbchmura@Ensign-BickfordInd.com
> > >Reply-To: "Struts Users Mailing List"
><struts-user@jakarta.apache.org>
> > >To: struts-user@jakarta.apache.org
> > >Subject: Validator problem (or user problem... not sure which yet)
> > >Date: Wed, 19 Jun 2002 13:42:49 -0400
> > >
> > >
> > >Hiya,
> > >
> > >
> > >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
> >form
> > >name like so:
> > >
> > ><form  name="formNewRequest">
> > >  <field    property="value(employeeFirstName)"
> > >    	  depends="required">
> > >          	     <arg0
> >key="registrationForm.firstname.displayname"/>
> > ></field>
> > ></form>
> > >
> > >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?
> > >
> > >Thanks
> > >
> > >Bill
> > >
> > >
> > >--
> > >To unsubscribe, e-mail:
> > ><mailto:struts-user-unsubscribe@jakarta.apache.org>
> > >For additional commands, e-mail:
> > ><mailto:struts-user-help@jakarta.apache.org>
> >
> >
> >
> >
> >_________________________________________________________________
> >Chat with friends online, try MSN Messenger: http://messenger.msn.com
> >
> >
> >--
> >To unsubscribe, e-mail:
> ><mailto:struts-user-unsubscribe@jakarta.apache.org>
> >For additional commands, e-mail:
> ><mailto:struts-user-help@jakarta.apache.org>
> >
> >
> >
> >--
> >To unsubscribe, e-mail:
> ><mailto:struts-user-unsubscribe@jakarta.apache.org>
> >For additional commands, e-mail:
> ><mailto:struts-user-help@jakarta.apache.org>
> >
>
>
>
>
>_________________________________________________________________
>Get your FREE download of MSN Explorer at
>http://explorer.msn.com/intl.asp.
>
>
>--
>To unsubscribe, e-mail:
><mailto:struts-user-unsubscribe@jakarta.apache.org>
>For additional commands, e-mail:
><mailto:struts-user-help@jakarta.apache.org>
>
>
>
>--
>To unsubscribe, e-mail:   
><mailto:struts-user-unsubscribe@jakarta.apache.org>
>For additional commands, e-mail: 
><mailto:struts-user-help@jakarta.apache.org>
>




_________________________________________________________________
MSN Photos is the easiest way to share and print your photos: 
http://photos.msn.com/support/worldwide.aspx


--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message