KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > alfresco > web > ui > repo > tag > NodeDescendantsTag


1 /*
2  * Copyright (C) 2005 Alfresco, Inc.
3  *
4  * Licensed under the Mozilla Public License version 1.1
5  * with a permitted attribution clause. You may obtain a
6  * copy of the License at
7  *
8  * http://www.alfresco.org/legal/license.txt
9  *
10  * Unless required by applicable law or agreed to in writing,
11  * software distributed under the License is distributed on an
12  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13  * either express or implied. See the License for the specific
14  * language governing permissions and limitations under the
15  * License.
16  */

17 package org.alfresco.web.ui.repo.tag;
18
19 import javax.faces.component.UICommand;
20 import javax.faces.component.UIComponent;
21
22 import org.alfresco.web.ui.common.tag.HtmlComponentTag;
23
24 /**
25  * @author Kevin Roast
26  */

27 public class NodeDescendantsTag extends HtmlComponentTag
28 {
29    /**
30     * @see javax.faces.webapp.UIComponentTag#getComponentType()
31     */

32    public String JavaDoc getComponentType()
33    {
34       return "org.alfresco.faces.NodeDescendants";
35    }
36
37    /**
38     * @see javax.faces.webapp.UIComponentTag#getRendererType()
39     */

40    public String JavaDoc getRendererType()
41    {
42       return "org.alfresco.faces.NodeDescendantsLinkRenderer";
43    }
44
45    /**
46     * @see javax.faces.webapp.UIComponentTag#setProperties(javax.faces.component.UIComponent)
47     */

48    protected void setProperties(UIComponent component)
49    {
50       super.setProperties(component);
51       
52       setBooleanProperty(component, "showEllipses", this.showEllipses);
53       setActionProperty((UICommand)component, this.action);
54       setActionListenerProperty((UICommand)component, this.actionListener);
55       setIntProperty(component, "maxChildren", this.maxChildren);
56       setStringProperty(component, "separator", this.separator);
57       setStringBindingProperty(component, "value", this.value);
58    }
59    
60    /**
61     * @see org.alfresco.web.ui.common.tag.HtmlComponentTag#release()
62     */

63    public void release()
64    {
65       super.release();
66       
67       this.showEllipses = null;
68       this.maxChildren = null;
69       this.separator = null;
70       this.action = null;
71       this.actionListener = null;
72       this.value = null;
73    }
74    
75    /**
76     * Set the maxChildren
77     *
78     * @param maxChildren the maxChildren
79     */

80    public void setMaxChildren(String JavaDoc maxChildren)
81    {
82       this.maxChildren = maxChildren;
83    }
84
85    /**
86     * Set the separator
87     *
88     * @param separator the separator
89     */

90    public void setSeparator(String JavaDoc separator)
91    {
92       this.separator = separator;
93    }
94
95    /**
96     * Set the action
97     *
98     * @param action the action
99     */

100    public void setAction(String JavaDoc action)
101    {
102       this.action = action;
103    }
104
105    /**
106     * Set the actionListener
107     *
108     * @param actionListener the actionListener
109     */

110    public void setActionListener(String JavaDoc actionListener)
111    {
112       this.actionListener = actionListener;
113    }
114
115    /**
116     * Set the value
117     *
118     * @param value the value
119     */

120    public void setValue(String JavaDoc value)
121    {
122       this.value = value;
123    }
124    
125    /**
126     * Set the show ellipses value
127     *
128     * @param showEllipses true to show ellipses when we have > maxchildren to display
129     */

130    public void setShowEllipses(String JavaDoc showEllipses)
131    {
132       this.showEllipses = showEllipses;
133    }
134
135
136    /** the showEllipses */
137    private String JavaDoc showEllipses;
138
139    /** the maxChildren */
140    private String JavaDoc maxChildren;
141
142    /** the separator */
143    private String JavaDoc separator;
144
145    /** the action */
146    private String JavaDoc action;
147
148    /** the actionListener */
149    private String JavaDoc actionListener;
150
151    /** the value */
152    private String JavaDoc value;
153 }
154
Popular Tags