struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Evan Schnell <eschn...@nvisia.com>
Subject Re: Struts Validator Debug output? What is it doing?
Date Tue, 28 Jan 2003 17:27:20 GMT
PILGRIM, Peter, FM wrote:

>>    
>>
>Cut the rubbish. 
>

Do you see your "forms" load from validator.xml on startup?

You should see something like:


15633   [main] DEBUG -   New match='form-validation/formset/form'
15643   [main] DEBUG -   Fire begin() for 
ObjectCreateRule[className=org.apache.commons.validator.Form, 
attributeName=className]
15643   [main] DEBUG - 
[ObjectCreateRule]{form-validation/formset/form}New 
org.apache.commons.validator.Form
15643   [main] DEBUG -   Fire begin() for SetPropertiesRule[]
15643   [main] DEBUG - [SetPropertiesRule]{form-validation/formset/form} 
Setting property 'name' to 'addToCartForm'
15643   [main] DEBUG - [SetPropertiesRule]{form-validation/formset/form} 
Set org.apache.commons.validator.Form properties
15643   [main] DEBUG - BeanUtils.populate(Form: null
, {name=addToCartForm})
15653   [main] DEBUG -   setProperty(Form: null

--and/or---

   Form: productDetailForm
    Field:
        key=                 productKey
        property=            productKey
    ....

Finally, have you done the major steps in your code:

    1. Make your form implement VaildatorForm or one of its ilk.
    2. Either delete the "validate" method from the form class or make 
sure it calls super.validate().
    3. Make sure the name of your form and its fields in your module 
configuration (struts-config.xml) match the name of the form in 
validation.xml.  
   
I have not done a lot with nested properties but David Winterfeldt's 
site (http://home.earthlink.net/~dwinterfeldt/index.html) claims they 
work with the validator.

Regards, Evan.


-- 
Evan Schnell, Technical Lead
nVISIA, Twin Cities  "Digital Architecture and Construction"
7701 France Ave. S, Edina, MN 55435
http://www.nvisia.com




--
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