KickJava   Java API By Example, From Geeks To Geeks.

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


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.BaseComponentTag;
23
24 /**
25  * @author Kevin Roast
26  */

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

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

40    public String JavaDoc getRendererType()
41    {
42       // self rendering component
43
return null;
44    }
45
46    /**
47     * @see javax.faces.webapp.UIComponentTag#setProperties(javax.faces.component.UIComponent)
48     */

49    protected void setProperties(UIComponent component)
50    {
51       super.setProperties(component);
52       
53       setStringProperty(component, "engine", this.engine);
54       setStringProperty(component, "template", this.template);
55       setStringBindingProperty(component, "model", this.model);
56    }
57    
58    /**
59     * @see org.alfresco.web.ui.common.tag.HtmlComponentTag#release()
60     */

61    public void release()
62    {
63       super.release();
64       
65       this.engine = null;
66       this.template = null;
67       this.model = null;
68    }
69    
70    /**
71     * Set the engine name
72     *
73     * @param engine the engine
74     */

75    public void setEngine(String JavaDoc engine)
76    {
77       this.engine = engine;
78    }
79
80    /**
81     * Set the template name
82     *
83     * @param template the template
84     */

85    public void setTemplate(String JavaDoc template)
86    {
87       this.template = template;
88    }
89
90    /**
91     * Set the data model
92     *
93     * @param model the model
94     */

95    public void setModel(String JavaDoc model)
96    {
97       this.model = model;
98    }
99
100
101    /** the engine name */
102    private String JavaDoc engine;
103
104    /** the template */
105    private String JavaDoc template;
106
107    /** the data model */
108    private String JavaDoc model;
109 }
110
Popular Tags