001/* 002 * (C) Copyright 2015 Nuxeo SA (http://nuxeo.com/) and contributors. 003 * 004 * All rights reserved. This program and the accompanying materials 005 * are made available under the terms of the GNU Lesser General Public License 006 * (LGPL) version 2.1 which accompanies this distribution, and is available at 007 * http://www.gnu.org/licenses/lgpl-2.1.html 008 * 009 * This library is distributed in the hope that it will be useful, 010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 012 * Lesser General Public License for more details. 013 * 014 * Contributors: 015 * Anahide Tchertchian 016 */ 017package org.nuxeo.theme.migration.tag.component; 018 019import java.io.IOException; 020 021import javax.faces.component.UIComponentBase; 022import javax.faces.context.FacesContext; 023import javax.faces.context.ResponseWriter; 024 025/** 026 * Disabled component for theme compat. 027 * 028 * @since 7.4 029 */ 030public class DisabledThemeComponent extends UIComponentBase { 031 032 public static final String COMPONENT_TYPE = "nuxeo.web.theme.disabled"; 033 034 public static final String COMPONENT_FAMILY = "nuxeo.web.theme.disabled"; 035 036 @Override 037 public String getFamily() { 038 return COMPONENT_FAMILY; 039 } 040 041 @Override 042 public String getRendererType() { 043 return null; 044 } 045 046 @Override 047 public void encodeBegin(FacesContext context) throws IOException { 048 ResponseWriter writer = context.getResponseWriter(); 049 writer.write("This theme tag is disabled. Please use another tag library"); 050 writer.flush(); 051 } 052 053}