KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > myfaces > custom > selectOneCountry > SelectOneCountryTag


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.selectOneCountry;
17
18 import javax.faces.component.UIComponent;
19
20 import org.apache.myfaces.taglib.html.ext.HtmlSelectOneMenuTag;
21
22 /**
23  * @author Sylvain Vieujot (latest modification by $Author: matzew $)
24  * @version $Revision: 1.2 $ $Date: 2005/02/18 17:19:30 $
25  * $Log: SelectOneCountryTag.java,v $
26  * Revision 1.2 2005/02/18 17:19:30 matzew
27  * added release() to tag clazzes.
28  *
29  * Revision 1.1 2005/02/09 13:05:20 svieujot
30  * new x:selectOneCountry component
31  *
32  *
33  */

34 public class SelectOneCountryTag extends HtmlSelectOneMenuTag {
35     public String JavaDoc getComponentType() {
36         return SelectOneCountry.COMPONENT_TYPE;
37     }
38
39     public String JavaDoc getRendererType() {
40         return "org.apache.myfaces.SelectOneCountryRenderer";
41     }
42     
43     private String JavaDoc maxLength;
44     
45     public void release() {
46         super.release();
47         maxLength=null;
48     }
49     
50     protected void setProperties(UIComponent component) {
51         super.setProperties(component);
52
53         setIntegerProperty(component, "maxLength", maxLength);
54     }
55     
56     public void setMaxLength(String JavaDoc maxLength){
57         this.maxLength = maxLength;
58     }
59 }
Popular Tags