Package org.apache.shale.validator.faces

Examples of org.apache.shale.validator.faces.ValidatorScript


        CommonsValidator validator2 = createValidator(component2, "floatRange");
        validator2.setMax(new Double(5).toString());
        validator2.setMin(new Double(1).toString());
       
        //create a script component
        ValidatorScript script = createValidatorScript(root);
       
        //set the value
        component1.setSubmittedValue("6");
        // invoke component validation
        component1.validate(facesContext);
View Full Code Here


              
        //create a required field/server rule
        CommonsValidator validator2 = createValidator(component2, "creditCard");
       
        //create a script component
        ValidatorScript script = createValidatorScript(root);
       
        //set the value
        component1.setSubmittedValue("11111111111111111111");
        // invoke component validation
        component1.validate(facesContext);
View Full Code Here

              
        //create a required field/server rule
        CommonsValidator validator2 = createValidator(component2, "email");
       
        //create a script component
        ValidatorScript script = createValidatorScript(root);
       
        //set the value
        component1.setSubmittedValue("xyz@abc");
        // invoke component validation
        component1.validate(facesContext);
View Full Code Here

    }
   
  
    private ValidatorScript createValidatorScript(UIViewRoot root) {
        //create a script component
        ValidatorScript script = (ValidatorScript) facesContext.getApplication().createComponent("org.apache.shale.ValidatorScript");
        assertNotNull(script);
        script.setId(root.createUniqueId());
        script.setFunctionName("validateForm");
       
        root.getChildren().add(root.getChildCount(), script);

        return script;
    }
View Full Code Here

TOP

Related Classes of org.apache.shale.validator.faces.ValidatorScript

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.