KickJava   Java API By Example, From Geeks To Geeks.

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


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  *
25  *
26  * @author Manfred Geiler (latest modification by $Author: matze $)
27  * @author Thomas Spiegl
28  * @version $Revision: 1.13 $ $Date: 2004/10/13 11:51:00 $
29  * $Log: HtmlMessagesRenderer.java,v $
30  * Revision 1.13 2004/10/13 11:51:00 matze
31  * renamed packages to org.apache
32  *
33  * Revision 1.12 2004/07/01 22:05:06 mwessendorf
34  * ASF switch
35  *
36  * Revision 1.11 2004/03/31 14:51:46 manolito
37  * summaryFormat and detailFormat support
38  *
39  * Revision 1.10 2004/03/30 17:47:34 manolito
40  * Message and Messages refactored
41  *
42  * Revision 1.9 2004/03/30 13:24:57 manolito
43  * refactoring: HtmlComponentTag moved to share and renamed to HtmlComponentTagBase
44  *
45  */

46 public class HtmlMessagesRenderer
47         extends HtmlMessagesRendererBase
48 {
49     //private static final Log log = LogFactory.getLog(HtmlMessagesRenderer.class);
50

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