Issue Details (XML | Word | Printable)

Key: SHALE-325
Type: Improvement Improvement
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Assignee: Unassigned
Reporter: Wendy Smoak
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Shale

Add a custom validation example to the Use Cases example app

Created: 06/Nov/06 10:23 PM   Updated: 23/Jan/07 04:40 PM
Return to search
Component/s: Validator
Affects Version/s: None
Fix Version/s: 1.0.4


 Description  « Hide
Add an example of using a custom validator to the Commons Validator Integration section of the use-cases example app.

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Repository Revision Date User Message
ASF #471907 Mon Nov 06 22:39:18 UTC 2006 wsmoak Adding an example of a custom validation rule to the use cases app. 'Priority' must be an even integer.
Unfortunately, it doesn't quite work. Entering an odd number causes a NPE when it tries to format the message.
SHALE-325
Files Changed
MODIFY /shale/framework/trunk/shale-apps/shale-usecases/src/main/resources/org/apache/shale/usecases/view/Bundle.properties
MODIFY /shale/framework/trunk/shale-apps/shale-usecases/src/main/webapp/WEB-INF/web.xml
ADD /shale/framework/trunk/shale-apps/shale-usecases/src/main/java/org/apache/shale/usecases/validator/CustomValidationUtil.java
MODIFY /shale/framework/trunk/shale-apps/shale-usecases/src/main/java/org/apache/shale/usecases/validator/Procedure.java
MODIFY /shale/framework/trunk/shale-apps/shale-usecases/src/main/webapp/validator/test.jsp
ADD /shale/framework/trunk/shale-apps/shale-usecases/src/main/webapp/WEB-INF/custom-rules.xml

Repository Revision Date User Message
ASF #472002 Tue Nov 07 06:25:12 UTC 2006 rahul Slightly better error reporting when resource key cannot be resolved. Log and rethrow exception as MissingResourceException (contains problem key in message), rather than ignoring it (which induces a harder to debug NPE down the road). Fallout of SHALE-325.
Files Changed
MODIFY /shale/framework/trunk/shale-validator/src/main/resources/org/apache/shale/validator/resources/Bundle.properties
MODIFY /shale/framework/trunk/shale-validator/src/main/java/org/apache/shale/validator/CommonsValidator.java

Repository Revision Date User Message
ASF #476703 Sun Nov 19 04:38:12 UTC 2006 rahul Fix NPE in custom validator while looking up validation failure message. Remove related TODO.
SHALE-325
Files Changed
MODIFY /shale/framework/trunk/shale-apps/shale-usecases/src/main/webapp/validator/test.jsp
MODIFY /shale/framework/trunk/shale-apps/shale-usecases/src/main/webapp/WEB-INF/faces-config.xml