This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to branch master
in repository 
https://gitbox.apache.org/repos/asf/sling-org-apache-sling-validation-examples.git

commit e2a7fe0c54b2a2acf91f0024c8b7a69e415b0522
Author: Konrad Windszus <k...@apache.org>
AuthorDate: Wed Jul 29 07:22:46 2015 +0000

    SLING-4876 support resource type inheritance for validator models
    
    This closes #100
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1693191 
13f79535-47bb-0310-9956-ffa450edef68
---
 .../java/org/apache/sling/validation/examples/models/UserModel.java     | 2 +-
 .../apache/sling/validation/examples/servlets/ModifyUserServlet.java    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/src/main/java/org/apache/sling/validation/examples/models/UserModel.java 
b/src/main/java/org/apache/sling/validation/examples/models/UserModel.java
index 471bf5d..f07c430 100644
--- a/src/main/java/org/apache/sling/validation/examples/models/UserModel.java
+++ b/src/main/java/org/apache/sling/validation/examples/models/UserModel.java
@@ -80,7 +80,7 @@ public class UserModel {
 
     @PostConstruct
     protected void validate() {
-        ValidationModel model = validationService.getValidationModel(resource);
+        ValidationModel model = validationService.getValidationModel(resource, 
false);
         if (model != null) {
             ValidationResult result = validationService.validate(resource, 
model);
             if (!result.isValid()) {
diff --git 
a/src/main/java/org/apache/sling/validation/examples/servlets/ModifyUserServlet.java
 
b/src/main/java/org/apache/sling/validation/examples/servlets/ModifyUserServlet.java
index 5fb92bc..e7a3944 100644
--- 
a/src/main/java/org/apache/sling/validation/examples/servlets/ModifyUserServlet.java
+++ 
b/src/main/java/org/apache/sling/validation/examples/servlets/ModifyUserServlet.java
@@ -58,7 +58,7 @@ public class ModifyUserServlet extends SlingAllMethodsServlet 
{
         }
         if (resourceType != null && !"".equals(resourceType)) {
             String resourcePath = 
request.getRequestPathInfo().getResourcePath();
-            ValidationModel vm = 
validationService.getValidationModel(resourceType, resourcePath);
+            ValidationModel vm = 
validationService.getValidationModel(resourceType, resourcePath, false);
             if (vm != null) {
                 ValidationResult vr = 
validationService.validate(requestParameters, vm);
                 if (vr.isValid()) {

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <commits@sling.apache.org>.

Reply via email to