KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > alfresco > web > ui > common > tag > BreadcrumbTag


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.common.tag;
18
19 import javax.faces.component.UICommand;
20 import javax.faces.component.UIComponent;
21
22 /**
23  * @author kevinr
24  */

25 public class BreadcrumbTag extends HtmlComponentTag
26 {
27    /**
28     * @see javax.faces.webapp.UIComponentTag#getComponentType()
29     */

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

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

46    protected void setProperties(UIComponent component)
47    {
48       super.setProperties(component);
49       
50       setActionProperty((UICommand)component, this.action);
51       setActionListenerProperty((UICommand)component, this.actionListener);
52       setStringProperty(component, "separator", this.separator);
53       setBooleanProperty(component, "showRoot", this.showRoot);
54       setBooleanProperty(component, "immediate", this.immediate);
55       setStringProperty(component, "value", this.value);
56    }
57
58    /**
59     * @see javax.servlet.jsp.tagext.Tag#release()
60     */

61    public void release()
62    {
63       super.release();
64       this.action = null;
65       this.actionListener = null;
66       this.separator = ">";
67       this.showRoot = "true";
68       this.immediate = null;
69       this.value = null;
70    }
71    
72    /**
73     * Set the action
74     *
75     * @param action the action
76     */

77    public void setAction(String JavaDoc action)
78    {
79       this.action = action;
80    }
81
82    /**
83     * Set the actionListener
84     *
85     * @param actionListener the actionListener
86     */

87    public void setActionListener(String JavaDoc actionListener)
88    {
89       this.actionListener = actionListener;
90    }
91
92    /**
93     * Set the separator
94     *
95     * @param separator the separator
96     */

97    public void setSeparator(String JavaDoc separator)
98    {
99       this.separator = separator;
100    }
101
102    /**
103     * Set the show root value
104     *
105     * @param showRoot the showRoot
106     */

107    public void setShowRoot(String JavaDoc showRoot)
108    {
109       this.showRoot = showRoot;
110    }
111    
112    /**
113     * Set if the action event fired is immediate
114     *
115     * @param immediate true if the action event fired is immediate
116     */

117    public void setImmediate(String JavaDoc immediate)
118    {
119       this.immediate = immediate;
120    }
121    
122    /**
123     * Set the value. The value for a breadcrumb is either a '/' separated String path
124     * or a List of IBreadcrumb handler instances.
125     *
126     * @param value the value
127     */

128    public void setValue(String JavaDoc value)
129    {
130       this.value = value;
131    }
132
133
134    /** the value */
135    private String JavaDoc value;
136    
137    /** the action */
138    private String JavaDoc action;
139
140    /** the actionListener */
141    private String JavaDoc actionListener;
142
143    /** the separator */
144    private String JavaDoc separator = ">";
145
146    /** the showRoot value */
147    private String JavaDoc showRoot = "true";
148    
149    /** true if the action event fired is immediate */
150    private String JavaDoc immediate;
151 }
152
Popular Tags