KickJava   Java API By Example, From Geeks To Geeks.

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


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.4 $ $Date: 2005/02/18 18:24:35 $
25  * $Log: HtmlMessageTagBase.java,v $
26  * Revision 1.4 2005/02/18 18:24:35 matzew
27  * added release() to tag clazzes.
28  *
29  * Revision 1.3 2004/10/13 11:51:01 matze
30  * renamed packages to org.apache
31  *
32  * Revision 1.2 2004/07/01 22:01:11 mwessendorf
33  * ASF switch
34  *
35  * Revision 1.1 2004/03/30 13:24:59 manolito
36  * refactoring: HtmlComponentTag moved to share and renamed to HtmlComponentTagBase
37  *
38  */

39 public abstract class HtmlMessageTagBase
40         extends HtmlComponentTagBase
41 {
42     //private static final Log log = LogFactory.getLog(HtmlOutputFormatTag.class);
43

44     // UIComponent attributes --> already implemented in UIComponentTagBase
45

46     // user role attributes --> already implemented in UIComponentTagBase
47

48     // HTML universal attributes --> already implemented in HtmlComponentTagBase
49

50     // HTML event handler attributes --> already implemented in HtmlComponentTagBase
51

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