KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > myfaces > taglib > html > HtmlMessagesTagBase


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.taglib.html;
17
18 import org.apache.myfaces.renderkit.JSFAttr;
19
20 import javax.faces.component.UIComponent;
21
22 /**
23  * @author Manfred Geiler (latest modification by $Author: matzew $)
24  * @version $Revision: 1.5 $ $Date: 2005/02/18 18:24:35 $
25  */

26 public abstract class HtmlMessagesTagBase
27         extends HtmlComponentTagBase
28 {
29     //private static final Log log = LogFactory.getLog(HtmlOutputFormatTag.class);
30

31     // UIComponent attributes --> already implemented in UIComponentTagBase
32

33     // user role attributes --> already implemented in UIComponentTagBase
34

35     // HTML universal attributes --> already implemented in HtmlComponentTagBase
36

37     // HTML event handler attributes --> already implemented in HtmlComponentTagBase
38

39     // UIMessages attributes
40
private String JavaDoc _showSummary;
41     private String JavaDoc _showDetail;
42     private String JavaDoc _globalOnly;
43
44     // HtmlMessages attributes
45
private String JavaDoc _infoClass;
46     private String JavaDoc _infoStyle;
47     private String JavaDoc _warnClass;
48     private String JavaDoc _warnStyle;
49     private String JavaDoc _errorClass;
50     private String JavaDoc _errorStyle;
51     private String JavaDoc _fatalClass;
52     private String JavaDoc _fatalStyle;
53     private String JavaDoc _layout;
54     private String JavaDoc _tooltip;
55
56     public void release() {
57         super.release();
58         _showSummary=null;
59         _showDetail=null;
60         _globalOnly=null;
61         _infoClass=null;
62         _infoStyle=null;
63         _warnClass=null;
64         _warnStyle=null;
65         _errorClass=null;
66         _errorStyle=null;
67         _fatalClass=null;
68         _fatalStyle=null;
69         _layout=null;
70         _tooltip=null;
71     }
72     
73     protected void setProperties(UIComponent component)
74     {
75         super.setProperties(component);
76
77         setBooleanProperty(component, JSFAttr.SHOW_SUMMARY_ATTR, _showSummary);
78         setBooleanProperty(component, JSFAttr.SHOW_DETAIL_ATTR, _showDetail);
79         setBooleanProperty(component, JSFAttr.GLOBAL_ONLY_ATTR, _globalOnly);
80
81         setStringProperty(component, JSFAttr.INFO_CLASS_ATTR, _infoClass);
82         setStringProperty(component, JSFAttr.INFO_STYLE_ATTR, _infoStyle);
83         setStringProperty(component, JSFAttr.WARN_CLASS_ATTR, _warnClass);
84         setStringProperty(component, JSFAttr.WARN_STYLE_ATTR, _warnStyle);
85         setStringProperty(component, JSFAttr.ERROR_CLASS_ATTR, _errorClass);
86         setStringProperty(component, JSFAttr.ERROR_STYLE_ATTR, _errorStyle);
87         setStringProperty(component, JSFAttr.FATAL_CLASS_ATTR, _fatalClass);
88         setStringProperty(component, JSFAttr.FATAL_STYLE_ATTR, _fatalStyle);
89         setStringProperty(component, JSFAttr.LAYOUT_ATTR, _layout);
90         setBooleanProperty(component, JSFAttr.TOOLTIP_ATTR, _tooltip);
91     }
92
93     public void setShowSummary(String JavaDoc showSummary)
94     {
95         _showSummary = showSummary;
96     }
97
98     public void setShowDetail(String JavaDoc showDetail)
99     {
100         _showDetail = showDetail;
101     }
102
103     public void setGlobalOnly(String JavaDoc globalOnly)
104     {
105         _globalOnly = globalOnly;
106     }
107
108     public void setErrorClass(String JavaDoc errorClass)
109     {
110         _errorClass = errorClass;
111     }
112
113     public void setErrorStyle(String JavaDoc errorStyle)
114     {
115         _errorStyle = errorStyle;
116     }
117
118     public void setFatalClass(String JavaDoc fatalClass)
119     {
120         _fatalClass = fatalClass;
121     }
122
123     public void setFatalStyle(String JavaDoc fatalStyle)
124     {
125         _fatalStyle = fatalStyle;
126     }
127
128     public void setInfoClass(String JavaDoc infoClass)
129     {
130         _infoClass = infoClass;
131     }
132
133     public void setInfoStyle(String JavaDoc infoStyle)
134     {
135         _infoStyle = infoStyle;
136     }
137
138     public void setWarnClass(String JavaDoc warnClass)
139     {
140         _warnClass = warnClass;
141     }
142
143     public void setWarnStyle(String JavaDoc warnStyle)
144     {
145         _warnStyle = warnStyle;
146     }
147
148     public void setLayout(String JavaDoc layout)
149     {
150         _layout = layout;
151     }
152
153     public void setTooltip(String JavaDoc tooltip)
154     {
155         _tooltip = tooltip;
156     }
157 }
158
Popular Tags