KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > myfaces > custom > tree > taglib > TreeCheckboxTag


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.tree.taglib;
17
18 import javax.faces.component.UIComponent;
19
20 import org.apache.myfaces.custom.tree.HtmlTreeCheckbox;
21 import org.apache.myfaces.taglib.core.SelectItemTagBase;
22
23 /**
24  * @author <a HREF="dlestrat@apache.org">David Le Strat</a>
25  */

26 public class TreeCheckboxTag extends SelectItemTagBase
27 {
28     /** The for attribute. */
29     private String JavaDoc forAttr;
30     
31     /**
32      * @see javax.faces.webapp.UIComponentTag#getComponentType()
33      */

34     public String JavaDoc getComponentType()
35     {
36         return HtmlTreeCheckbox.COMPONENT_TYPE;
37     }
38
39     /**
40      * @see javax.faces.webapp.UIComponentTag#getRendererType()
41      */

42     public String JavaDoc getRendererType()
43     {
44         return null;
45     }
46     
47     /**
48      * @return Returns the forAttr.
49      */

50     public String JavaDoc getFor()
51     {
52         return this.forAttr;
53     }
54     /**
55      * @param forAttr The forAttr to set.
56      */

57     public void setFor(String JavaDoc forAttr)
58     {
59         this.forAttr = forAttr;
60     }
61     
62     public void release() {
63         super.release();
64         this.forAttr = null;
65     }
66     
67     /**
68      * @see javax.faces.webapp.UIComponentTag#setProperties(javax.faces.component.UIComponent)
69      */

70     protected void setProperties(UIComponent component)
71     {
72         super.setProperties(component);
73
74         setStringProperty(component, HtmlTreeCheckbox.FOR_ATTR, this.forAttr);
75     }
76 }
77
Popular Tags