01: /*
02: * Copyright 2004 The Apache Software Foundation.
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
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 org.apache.myfaces.shared_impl.renderkit.html.HtmlMessageRendererBase;
19:
20: import javax.faces.application.FacesMessage;
21: import javax.faces.component.UIComponent;
22: import javax.faces.context.FacesContext;
23: import java.io.IOException;
24:
25: /**
26: * @author Manfred Geiler (latest modification by $Author: schof $)
27: * @author Thomas Spiegl
28: * @version $Revision: 382015 $ $Date: 2006-03-01 14:47:11 +0100 (Mi, 01 Mrz 2006) $
29: */
30: public class HtmlMessageRenderer extends HtmlMessageRendererBase {
31: //private static final Log log = LogFactory.getLog(HtmlMessageRenderer.class);
32:
33: public void encodeEnd(FacesContext facesContext,
34: UIComponent component) throws IOException {
35: super .encodeEnd(facesContext, component); //check for NP
36: renderMessage(facesContext, component);
37: }
38:
39: protected String getSummary(FacesContext facesContext,
40: UIComponent message, FacesMessage facesMessage,
41: String msgClientId) {
42: return facesMessage.getSummary();
43: }
44:
45: protected String getDetail(FacesContext facesContext,
46: UIComponent message, FacesMessage facesMessage,
47: String msgClientId) {
48: return facesMessage.getDetail();
49: }
50: }
|