/* * (C) Copyright 2006-2008 Nuxeo SAS (http://nuxeo.com/) and contributors. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the GNU Lesser General Public License * (LGPL) version 2.1 which accompanies this distribution, and is available at * http://www.gnu.org/licenses/lgpl.html * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * Contributors: * <a href="mailto:at@nuxeo.com">Anahide Tchertchian</a> * * $Id$ */ package org.nuxeo.ecm.platform.ui.web.component; import java.io.IOException; import javax.faces.component.UIComponentBase; import javax.faces.context.FacesContext; import javax.faces.context.ResponseWriter; /** * Component rendering a disabled message. * * @author Anahide Tchertchian */ public class DisabledComponent extends UIComponentBase { public static final String COMPONENT_TYPE = "nuxeo.web.disabled"; public static final String COMPONENT_FAMILY = "nuxeo.web.disabled"; @Override public String getFamily() { return COMPONENT_FAMILY; } @Override public String getRendererType() { return null; } @Override public void encodeBegin(FacesContext context) throws IOException { ResponseWriter writer = context.getResponseWriter(); writer.write("This component is disabled. Please use another tag library"); writer.flush(); } }