struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul Benedict (JIRA)" <j...@apache.org>
Subject [jira] Commented: (STR-2611) [validator] Cite the form name in case of an error (Unknown property 'fieldName')
Date Sun, 01 Jul 2007 03:32:26 GMT

    [ https://issues.apache.org/struts/browse/STR-2611?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_41321
] 

Paul Benedict commented on STR-2611:
------------------------------------

Unfortunately, ValidatorUtils.getValueAsString eats the exception. Niall, I think that method
should pass the exception back, and I can't rely on the method returning null to determine
an error.

> [validator] Cite the form name in case of an error (Unknown property 'fieldName')
> ---------------------------------------------------------------------------------
>
>                 Key: STR-2611
>                 URL: https://issues.apache.org/struts/browse/STR-2611
>             Project: Struts 1
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: Nightly Build
>         Environment: Operating System: other
> Platform: Other
>            Reporter: Ralf Hauser
>            Priority: Minor
>             Fix For: 1.4.0
>
>
> java.lang.NoSuchMethodException: Unknown property 'from'
>         at
> org.apache.commons.beanutils.PropertyUtilsBean.getSimpleProperty(PropertyUtilsBean.java:1122)
>         at
> org.apache.commons.beanutils.PropertyUtilsBean.getNestedProperty(PropertyUtilsBean.java:686)
>         at
> org.apache.commons.beanutils.PropertyUtilsBean.getProperty(PropertyUtilsBean.java:715)
>         at
> org.apache.commons.beanutils.PropertyUtils.getProperty(PropertyUtils.java:290)
>         at
> org.apache.commons.validator.util.ValidatorUtils.getValueAsString(ValidatorUtils.java:105)
>         at
> org.apache.struts.validator.FieldChecks.validateMinLength(FieldChecks.java:859)
>         at sun.reflect.GeneratedMethodAccessor277.invoke(Unknown Source)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at
> org.apache.commons.validator.ValidatorAction.executeValidationMethod(ValidatorAction.java:567)
>         at org.apache.commons.validator.Field.validateForRule(Field.java:827)
>         at org.apache.commons.validator.Field.validate(Field.java:906)
>         at org.apache.commons.validator.Form.validate(Form.java:174)
>         at org.apache.commons.validator.Validator.validate(Validator.java:367)
>         at
> org.apache.struts.validator.ValidatorForm.validate(ValidatorForm.java:110)
> ...
> it appears that my form is validated against the rules of another form. However,
> I cannot see an config error neither in my struts-config.xml nor in the
> validation.xml
> It would be helpful if in the case of an error also the form name from which the
> field-rules are taken are cited!

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message