001    /*
002     * Licensed to the Apache Software Foundation (ASF) under one
003     * or more contributor license agreements.  See the NOTICE file
004     * distributed with this work for additional information
005     * regarding copyright ownership.  The ASF licenses this file
006     * to you under the Apache License, Version 2.0 (the
007     * "License"); you may not use this file except in compliance
008     * with the License.  You may obtain a copy of the License at
009     *
010     *   http://www.apache.org/licenses/LICENSE-2.0
011     *
012     * Unless required by applicable law or agreed to in writing,
013     * software distributed under the License is distributed on an
014     * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
015     * KIND, either express or implied.  See the License for the
016     * specific language governing permissions and limitations
017     * under the License.
018     */
019    
020    package org.apache.myfaces.tobago.renderkit;
021    
022    import javax.faces.render.Renderer;
023    import javax.faces.context.FacesContext;
024    import javax.faces.component.UIComponent;
025    import javax.faces.convert.ConverterException;
026    import java.io.IOException;
027    
028    /*
029     * User: bommel
030     * Date: Mar 9, 2007
031     * Time: 7:39:10 PM
032     */
033    public class RendererBaseWrapper extends LayoutableRendererBase {
034      private Renderer renderer;
035    
036      public RendererBaseWrapper(Renderer renderer) {
037        this.renderer = renderer;
038      }
039    
040      public Object getConvertedValue(FacesContext context, UIComponent component, Object submittedValue)
041          throws ConverterException {
042        return renderer.getConvertedValue(context, component, submittedValue);
043      }
044    
045      public void decode(FacesContext facesContext, UIComponent component) {
046        renderer.decode(facesContext, component);
047      }
048    
049      public void encodeBegin(FacesContext context, UIComponent component) throws IOException {
050        renderer.encodeBegin(context, component);
051      }
052    
053      public void encodeChildren(FacesContext context, UIComponent component) throws IOException {
054        renderer.encodeChildren(context, component);
055      }
056    
057      public void encodeEnd(FacesContext context, UIComponent component) throws IOException {
058        renderer.encodeEnd(context, component);
059      }
060    
061      public String convertClientId(FacesContext context, String clientId) {
062        return renderer.convertClientId(context, clientId);
063      }
064    
065      public boolean getRendersChildren() {
066        return renderer.getRendersChildren();
067      }
068    }