KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > myfaces > custom > navigation > HtmlPanelNavigationTag


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.navigation;
17
18 import org.apache.myfaces.renderkit.html.HTML;
19 import org.apache.myfaces.taglib.html.ext.HtmlPanelGroupTag;
20
21 import javax.faces.component.UIComponent;
22
23 /**
24  * DOCUMENT ME!
25  * @author Manfred Geiler (latest modification by $Author: matzew $)
26  * @version $Revision: 1.6 $ $Date: 2005/02/18 17:19:30 $
27  */

28 public class HtmlPanelNavigationTag
29     extends HtmlPanelGroupTag
30 {
31     public String JavaDoc getComponentType()
32     {
33         return HtmlPanelNavigation.COMPONENT_TYPE;
34     }
35
36     public String JavaDoc getRendererType()
37     {
38         return "org.apache.myfaces.Navigation";
39     }
40
41     // UIComponent attributes --> already implemented in UIComponentBodyTagBase
42

43     // HTML universal attributes --> already implemented in MyFacesTag
44

45     // HTML event handler attributes --> already implemented in MyFacesTag
46

47     // UIPanel attributes --> value attribute already implemented in UIComponentBodyTagBase
48

49     // HtmlPanelNavigation attributes
50
private String JavaDoc _itemClass;
51     private String JavaDoc _openItemClass;
52     private String JavaDoc _activeItemClass;
53     private String JavaDoc _separatorClass;
54     private String JavaDoc _itemStyle;
55     private String JavaDoc _openItemStyle;
56     private String JavaDoc _activeItemStyle;
57     private String JavaDoc _separatorStyle;
58
59     // HTML table attributes
60
private String JavaDoc _align;
61     private String JavaDoc _bgcolor;
62     private String JavaDoc _border;
63     private String JavaDoc _cellpadding;
64     private String JavaDoc _cellspacing;
65     private String JavaDoc _datafld;
66     private String JavaDoc _datasrc;
67     private String JavaDoc _dataformatas;
68     private String JavaDoc _frame;
69     private String JavaDoc _rules;
70     private String JavaDoc _summary;
71     private String JavaDoc _width;
72     
73     public void release() {
74         super.release();
75
76         _itemClass=null;
77         _openItemClass=null;
78         _activeItemClass=null;
79         _separatorClass=null;
80         _itemStyle=null;
81         _openItemStyle=null;
82         _activeItemStyle=null;
83         _separatorStyle=null;
84         _align=null;
85         _bgcolor=null;
86         _border=null;
87         _cellpadding=null;
88         _cellspacing=null;
89         _datafld=null;
90         _datasrc=null;
91         _dataformatas=null;
92         _frame=null;
93         _rules=null;
94         _summary=null;
95         _width=null;
96
97     }
98
99     // User Role support --> already handled by HtmlPanelGroupTag
100

101     
102     protected void setProperties(UIComponent component)
103     {
104         super.setProperties(component);
105
106         setStringProperty(component, "itemClass", _itemClass);
107         setStringProperty(component, "openItemClass", _openItemClass);
108         setStringProperty(component, "activeItemClass", _activeItemClass);
109         setStringProperty(component, "separatorClass", _separatorClass);
110         setStringProperty(component, "itemStyle", _itemStyle);
111         setStringProperty(component, "openItemStyle", _openItemStyle);
112         setStringProperty(component, "activeItemStyle", _activeItemStyle);
113         setStringProperty(component, "separatorStyle", _separatorStyle);
114
115         setStringProperty(component, HTML.ALIGN_ATTR, _align);
116         setStringProperty(component, HTML.BGCOLOR_ATTR, _bgcolor);
117         setStringProperty(component, HTML.BORDER_ATTR, _border);
118         setStringProperty(component, HTML.CELLPADDING_ATTR, _cellpadding);
119         setStringProperty(component, HTML.CELLSPACING_ATTR, _cellspacing);
120         setStringProperty(component, HTML.DATAFLD_ATTR, _datafld);
121         setStringProperty(component, HTML.DATASRC_ATTR, _datasrc);
122         setStringProperty(component, HTML.DATAFORMATAS_ATTR, _dataformatas);
123         setStringProperty(component, HTML.FRAME_ATTR, _frame);
124         setStringProperty(component, HTML.RULES_ATTR, _rules);
125         setStringProperty(component, HTML.SUMMARY_ATTR, _summary);
126         setStringProperty(component, HTML.WIDTH_ATTR, _width);
127     }
128
129     public void setItemClass(String JavaDoc itemClass)
130     {
131         _itemClass = itemClass;
132     }
133
134     public void setOpenItemClass(String JavaDoc openItemClass)
135     {
136         _openItemClass = openItemClass;
137     }
138
139     public void setActiveItemClass(String JavaDoc activeItemClass)
140     {
141         _activeItemClass = activeItemClass;
142     }
143
144     public void setSeparatorClass(String JavaDoc separatorClass)
145     {
146         _separatorClass = separatorClass;
147     }
148
149     public void setItemStyle(String JavaDoc itemStyle)
150     {
151         _itemStyle = itemStyle;
152     }
153
154     public void setOpenItemStyle(String JavaDoc openItemStyle)
155     {
156         _openItemStyle = openItemStyle;
157     }
158
159     public void setActiveItemStyle(String JavaDoc activeItemStyle)
160     {
161         _activeItemStyle = activeItemStyle;
162     }
163
164     public void setSeparatorStyle(String JavaDoc separatorStyle)
165     {
166         _separatorStyle = separatorStyle;
167     }
168
169     public void setAlign(String JavaDoc align)
170     {
171         _align = align;
172     }
173
174     public void setBgcolor(String JavaDoc bgcolor)
175     {
176         _bgcolor = bgcolor;
177     }
178
179     public void setBorder(String JavaDoc border)
180     {
181         _border = border;
182     }
183
184     public void setCellpadding(String JavaDoc cellpadding)
185     {
186         _cellpadding = cellpadding;
187     }
188
189     public void setCellspacing(String JavaDoc cellspacing)
190     {
191         _cellspacing = cellspacing;
192     }
193
194     public void setDatafld(String JavaDoc datafld)
195     {
196         _datafld = datafld;
197     }
198
199     public void setDatasrc(String JavaDoc datasrc)
200     {
201         _datasrc = datasrc;
202     }
203
204     public void setDataformatas(String JavaDoc dataformatas)
205     {
206         _dataformatas = dataformatas;
207     }
208
209     public void setFrame(String JavaDoc frame)
210     {
211         _frame = frame;
212     }
213
214     public void setRules(String JavaDoc rules)
215     {
216         _rules = rules;
217     }
218
219     public void setSummary(String JavaDoc summary)
220     {
221         _summary = summary;
222     }
223
224     public void setWidth(String JavaDoc width)
225     {
226         _width = width;
227     }
228 }
229
Popular Tags