KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > myfaces > renderkit > html > HtmlMessageRenderer


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.renderkit.html;
17
18 import javax.faces.application.FacesMessage;
19 import javax.faces.component.UIComponent;
20 import javax.faces.context.FacesContext;
21 import java.io.IOException JavaDoc;
22
23 /**
24  * @author Manfred Geiler (latest modification by $Author: matze $)
25  * @author Thomas Spiegl
26  * @version $Revision: 1.16 $ $Date: 2004/10/13 11:51:00 $
27  * $Log: HtmlMessageRenderer.java,v $
28  * Revision 1.16 2004/10/13 11:51:00 matze
29  * renamed packages to org.apache
30  *
31  * Revision 1.15 2004/07/01 22:05:06 mwessendorf
32  * ASF switch
33  *
34  * Revision 1.14 2004/03/31 14:51:46 manolito
35  * summaryFormat and detailFormat support
36  *
37  * Revision 1.13 2004/03/30 17:47:34 manolito
38  * Message and Messages refactored
39  *
40  * Revision 1.12 2004/03/30 13:24:57 manolito
41  * refactoring: HtmlComponentTag moved to share and renamed to HtmlComponentTagBase
42  *
43  */

44 public class HtmlMessageRenderer
45         extends HtmlMessageRendererBase
46 {
47     //private static final Log log = LogFactory.getLog(HtmlMessageRenderer.class);
48

49     public void encodeEnd(FacesContext facesContext, UIComponent component)
50             throws IOException JavaDoc
51     {
52         super.encodeEnd(facesContext, component); //check for NP
53
renderMessage(facesContext, component);
54     }
55
56     protected String JavaDoc getSummary(FacesContext facesContext,
57                                 UIComponent message,
58                                 FacesMessage facesMessage,
59                                 String JavaDoc msgClientId)
60     {
61         return facesMessage.getSummary();
62     }
63
64     protected String JavaDoc getDetail(FacesContext facesContext,
65                                UIComponent message,
66                                FacesMessage facesMessage,
67                                String JavaDoc msgClientId)
68     {
69         return facesMessage.getDetail();
70     }
71 }
72
Popular Tags