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.HtmlMessagesRendererBase;
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: *
27: *
28: * @author Manfred Geiler (latest modification by $Author: schof $)
29: * @author Thomas Spiegl
30: * @version $Revision: 382015 $ $Date: 2006-03-01 14:47:11 +0100 (Mi, 01 Mrz 2006) $
31: */
32: public class HtmlMessagesRenderer extends HtmlMessagesRendererBase {
33: //private static final Log log = LogFactory.getLog(HtmlMessagesRenderer.class);
34:
35: public void encodeEnd(FacesContext facesContext,
36: UIComponent component) throws IOException {
37: super .encodeEnd(facesContext, component); //check for NP
38: renderMessages(facesContext, component);
39: }
40:
41: protected String getSummary(FacesContext facesContext,
42: UIComponent message, FacesMessage facesMessage,
43: String msgClientId) {
44: return facesMessage.getSummary();
45: }
46:
47: protected String getDetail(FacesContext facesContext,
48: UIComponent message, FacesMessage facesMessage,
49: String msgClientId) {
50: return facesMessage.getDetail();
51: }
52: }
|