Title: Issue with ModelDriven Validation

I am having a problem with getting model driven validation.  I am getting an OGNL exception stating that if can't get the value of my property as defined in the <ActionClassname>-validation.xml file.  I remember reading about a bug in with this and model driven beans but not sure if it is related.   Below is a segment of the excpetion

Sep 30, 2003 2:23:50 PM com.opensymphony.xwork.validator.validators.ValidatorSupport getFieldValue
SEVERE: Caught exception while getting value for field userName
ognl.NoSuchPropertyException: userName
        at ognl.ObjectPropertyAccessor.getProperty(ObjectPropertyAccessor.java:123)
        at ognl.OgnlRuntime.getProperty(OgnlRuntime.java:1219)
        at ognl.ASTProperty.getValueBody(ASTProperty.java:108)
        at ognl.SimpleNode.getValue(SimpleNode.java:129)
        at ognl.Ognl.getValue(Ognl.java:335)
        at ognl.Ognl.getValue(Ognl.java:310)
        at com.opensymphony.xwork.validator.validators.ValidatorSupport.getFieldValue(ValidatorSupport.java:80)
        at com.opensymphony.xwork.validator.validators.RequiredStringValidator.validate(RequiredStringValidator.java:23)


Here is a segment of the validation.xml file

<field name="userName">
        <field-validator type="requiredstring">
            <message>You must enter a value for username</message>
        </field-validator>
    </field>

And I my model does have a getter and setter with the correct case.

And lastly here are there interceptors and the order of which they are called.
                <interceptor-ref name="defaultStack"/>
            <interceptor-ref name="component"/>
            <interceptor-ref name="model-driven"/>       
            <interceptor-ref name="validation"/>
            <interceptor-ref name="workflow"/> 

Any help?

Kris

Reply via email to