If you want to make sure a value is within given Long range then the LongRangeValidator is for you!
Say you want to make sure your users are at least 13 but at most 18.
The LengthValidator is one of the standard validators that is specified by the JavaServerFaces specification. It allows you to verify (validate) if the proposed input (submitted value) on a given component is valid.
The definition of a Validator according to the Validator interface:
void validate(FacesContext context, UIComponent component, Object value) throws ValidatorException
The Faces Context is passed in so the validator can introspect various aspects of the request and response.
During the JSF lifecycle each input value can be validated. As such the JSF runtime allows you to write validators that will take care of that during request processing.
In the previous articles we have concentrated on testing using Glassfish. But can you use the same
recipe to do testing on Weblogic. The answer is YES, but ..... Yea you know there is always a caveat.
First make sure you have Weblogic installed properly. Note I did the testing with the latest 12c version,
so your mileage may vary.
In the previous article we described how to do testing with multiple containers. But since joining
the Glassfish team I have wondered how can I test applications against different versions of JSF on Glassfish?
In the previous article we have worked out how to run the integration tests against Glassfish,
but what about other versions of Glassfish or even other servers?
In the previous article we added the Glassfish application server into the mix for testing. This looks all nice,
but one might wonder how this would work in a parent project (POM) and child projects setup. Well it is
fairly easy to accomplish.
In the previous article we described a setup for integration testing. It did not explain
how to do automatic deployment to an application server. Since we want to make it
convenient to do integration tests we are now going to add Glassfish into the mix.
If you want to do integration testing using HtmlUnit and Maven the following sets you up for easy testing.