01: /**********************************************************************************
02: *
03: * Header:
04: *
05: ***********************************************************************************
06: *
07: * Copyright (c) 2003, 2004 The Sakai Foundation.
08: *
09: * Licensed under the Educational Community License, Version 1.0 (the "License");
10: * you may not use this file except in compliance with the License.
11: * You may obtain a copy of the License at
12: *
13: * http://www.opensource.org/licenses/ecl1.php
14: *
15: * Unless required by applicable law or agreed to in writing, software
16: * distributed under the License is distributed on an "AS IS" BASIS,
17: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18: * See the License for the specific language governing permissions and
19: * limitations under the License.
20: *
21: **********************************************************************************/package org.sakaiproject.jsf.renderer;
22:
23: import java.io.IOException;
24:
25: import javax.faces.component.UIComponent;
26: import javax.faces.context.FacesContext;
27: import javax.faces.context.ResponseWriter;
28: import javax.faces.render.Renderer;
29:
30: /**
31: * <p>ToolBarSpacerRenderer is an HTML renderer for the Sakai ToolBarSpacer tag in JSF.</p>
32: * <p>This does not render children, but can deal with children by surrounding them in a comment.</p>
33: *
34: * @author University of Michigan, Sakai Software Development Team
35: * @version $Revision: 9278 $
36: */
37: public class ToolBarSpacerRenderer extends Renderer {
38: public boolean supportsComponentType(UIComponent component) {
39: return (component instanceof org.sakaiproject.jsf.component.ToolBarSpacerComponent);
40: }
41:
42: public void encodeBegin(FacesContext context, UIComponent component)
43: throws IOException {
44: ResponseWriter writer = context.getResponseWriter();
45: writer
46: .write("<span class=\"chefToolBarDisabled\"> | </span>");
47:
48: return;
49: }
50:
51: public void encodeEnd(FacesContext context, UIComponent component)
52: throws IOException {
53: }
54:
55: public boolean getRendersChildren() {
56: return false;
57: }
58: }
|