Re: RequiredFieldValidator and error message from property file via key

2009-12-06 Thread nguyenlinh
> will never be the case for a primitive field. > > > -- View this message in context: http://old.nabble.com/RequiredFieldValidator-and-error-message-from-property-file-via-key-tp26640581p26669544.html Sent from the Strut

Re: RequiredFieldValidator and error message from property file via key

2009-12-06 Thread nguyenlinh
lidator checks if the field is null which >> will never be the case for a primitive field. >> >> > > -- View this message in context: http://old.nabble.com/RequiredFieldValidator-and-error-message-f

Re: RequiredFieldValidator and error message from property file via key

2009-12-06 Thread nguyenlinh
> -- View this message in context: http://old.nabble.com/RequiredFieldValidator-and-error-message-from-property-file-via-key-tp26640581p26669216.html Sent from the Struts - User mailing list archive at Nabble.com.

Re: RequiredFieldValidator and error message from property file via key

2009-12-04 Thread Greg Lindholm
You may have a different problem then you think; The @RequiredFieldValidator does not make any sense on a int (primitive) field as an int cannot be null. The validation interceptor checks the values on the fields after params interceptor sets the fields. The RequiredFieldValidator checks if the fi

RequiredFieldValidator and error message from property file via key

2009-12-04 Thread Per Johansson
Hi, I'm trying to get error messages from a resource bundle. This is the code for my action class: @RequiredFieldValidator(type=ValidatorType.FIELD, key="myFieldErrorMsg", message="Error") public void setMyField(int myField) { this.myField = myField; } @Override public void validate() {