KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > myfaces > custom > emailvalidator > ValidateEmailTag


1 /*
2  * Copyright 2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16 package org.apache.myfaces.custom.emailvalidator;
17
18 import javax.faces.validator.Validator;
19 import javax.faces.webapp.ValidatorTag;
20 import javax.servlet.jsp.JspException JavaDoc;
21
22 /**
23  * @author mwessendorf (latest modification by $Author: matze $)
24  * @version $Revision: 1.4 $ $Date: 2004/10/13 11:50:57 $
25  * $Log: ValidateEmailTag.java,v $
26  * Revision 1.4 2004/10/13 11:50:57 matze
27  * renamed packages to org.apache
28  *
29  * Revision 1.3 2004/09/15 07:58:58 mwessendorf
30  * Custom Validators now work in OC4J - thanks to Daniel Kamakura for supporting this
31  *
32  * Revision 1.2 2004/07/01 21:53:11 mwessendorf
33  * ASF switch
34  *
35  * Revision 1.1 2004/05/27 14:09:01 manolito
36  * creditcard and email validator refactored
37  *
38  */

39 public class ValidateEmailTag extends ValidatorTag
40 {
41     
42     public ValidateEmailTag()
43     {
44     }
45
46     /* (non-Javadoc)
47      * @see javax.faces.webapp.ValidatorTag#createValidator()
48      */

49     protected Validator createValidator() throws JspException JavaDoc
50     {
51         setValidatorId(EmailValidator.VALIDATOR_ID);
52         EmailValidator validator = (EmailValidator)super.createValidator();
53         return validator;
54     }
55     
56     public void release()
57     {
58         super.release();
59     }
60
61 }
62
Popular Tags