001/*
002 * (C) Copyright 2006-2007 Nuxeo SAS <http://nuxeo.com> and others
003 *
004 * All rights reserved. This program and the accompanying materials
005 * are made available under the terms of the Eclipse Public License v1.0
006 * which accompanies this distribution, and is available at
007 * http://www.eclipse.org/legal/epl-v10.html
008 *
009 * Contributors:
010 *     Jean-Marc Orliaguet, Chalmers
011 *
012 * $Id$
013 */
014
015package org.nuxeo.theme.jsf.taglib;
016
017import javax.faces.component.UIComponent;
018import javax.faces.webapp.UIComponentELTag;
019
020public class RequireTag extends UIComponentELTag {
021
022    private String resource;
023
024    @Override
025    public String getComponentType() {
026        return "nxthemes.require";
027    }
028
029    @Override
030    public String getRendererType() {
031        return null;
032    }
033
034    @Override
035    protected void setProperties(UIComponent component) {
036        super.setProperties(component);
037        if (resource != null) {
038            component.getAttributes().put("resource", resource);
039        }
040    }
041
042    @Override
043    public void release() {
044        super.release();
045        resource = null;
046    }
047
048    public String getResource() {
049        return resource;
050    }
051
052    public void setResource(String resource) {
053        this.resource = resource;
054    }
055
056}