Does anybody know if it is possible to replace the ELException with a more meaningful description?
Background Info: I have a text field which accepts input and validation stops users entering a certain length. If this is accepted further checking occurs during the binding of the entered data to the data model. At this point an exception is thrown providing a description of the problem. However JSF always reports an ElException:
javax.faces.el.EvaluationException: javax.el.ELException: Error writing 'amountScreen' on type com.essentis.datamodel.ejm.MainFee
Is there anyway of replacing this error message with a more meaninfull error message? Is there something similiar to JSF converter messages. Like the one for INTEGER?
javax.faces.converter.IntegerConverter.INTEGER=Must be a numeric consisting of one or more digits.
Normally you'd get that error when the property referred to in the EL isn't defined in accessible way. For example, if the setter/getter has an improper signature, such as not being defined as "public". Alternatively, it could indicate that the backing object cannot directly handle the conversion to/from a display string (in which case you probably need to define a property whose mutators can do the required translations).
You shouldn't get ELExceptions for invalid data, only for actual programming errors. So there shouldn't be a need to override the message. I'm fairly sure you can override the message, as far as it goes, but like I said, it's a symptom of a bigger problem, so I wouldn't bother.
Customer surveys are for companies who didn't pay proper attention to begin with.
subject: Replace the ELException with a more meaningful description