KickJava   Java API By Example, From Geeks To Geeks.

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


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  * Tag class for the UINodePath component
26  *
27  * @author Kevin Roast
28  */

29 public class NodePathTag extends HtmlComponentTag
30 {
31    /**
32     * @see javax.faces.webapp.UIComponentTag#getComponentType()
33     */

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

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

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

65    public void release()
66    {
67       super.release();
68       
69       this.action = null;
70       this.actionListener = null;
71       this.value = null;
72       this.disabled = null;
73       this.breadcrumb = null;
74       this.showLeaf = null;
75    }
76    
77    /**
78     * Set the action
79     *
80     * @param action the action
81     */

82    public void setAction(String JavaDoc action)
83    {
84       this.action = action;
85    }
86
87    /**
88     * Set the actionListener
89     *
90     * @param actionListener the actionListener
91     */

92    public void setActionListener(String JavaDoc actionListener)
93    {
94       this.actionListener = actionListener;
95    }
96
97    /**
98     * Set the value
99     *
100     * @param value the value
101     */

102    public void setValue(String JavaDoc value)
103    {
104       this.value = value;
105    }
106    
107    /**
108     * Set whether to display the path as a breadcrumb or a single long link (default)
109     *
110     * @param breadcrumb breadcrumb true|false
111     */

112    public void setBreadcrumb(String JavaDoc breadcrumb)
113    {
114       this.breadcrumb = breadcrumb;
115    }
116    
117    /**
118     * Set whether the component is disabled
119     *
120     * @param disabled whether the component is disabled
121     */

122    public void setDisabled(String JavaDoc disabled)
123    {
124       this.disabled = disabled;
125    }
126    
127    /**
128     * Set whether the final leaf node is shown as part of the path
129     *
130     * @param showLeaf whether the final leaf node is shown as part of the path
131     */

132    public void setShowLeaf(String JavaDoc showLeaf)
133    {
134       this.showLeaf = showLeaf;
135    }
136
137
138    /** the showLeaf boolean */
139    private String JavaDoc showLeaf;
140
141    /** the disabled boolean */
142    private String JavaDoc disabled;
143
144    /** the breadcrumb boolean */
145    private String JavaDoc breadcrumb;
146
147    /** the action */
148    private String JavaDoc action;
149
150    /** the actionListener */
151    private String JavaDoc actionListener;
152
153    /** the value */
154    private String JavaDoc value;
155 }
156
Popular Tags