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 FragmentTag extends UIComponentELTag {
021
022    private String uid;
023
024    private String engine;
025
026    private String mode;
027
028    @Override
029    public String getComponentType() {
030        return "nxthemes.fragment";
031    }
032
033    @Override
034    public String getRendererType() {
035        return null;
036    }
037
038    @Override
039    protected void setProperties(UIComponent component) {
040        super.setProperties(component);
041        component.getAttributes().put("uid", uid);
042        component.getAttributes().put("engine", engine);
043        component.getAttributes().put("mode", mode);
044    }
045
046    @Override
047    public void release() {
048        super.release();
049        uid = null;
050        engine = null;
051        mode = null;
052    }
053
054    public String getUid() {
055        return uid;
056    }
057
058    public void setUid(String uid) {
059        this.uid = uid;
060    }
061
062    public String getEngine() {
063        return engine;
064    }
065
066    public void setEngine(String engine) {
067        this.engine = engine;
068    }
069
070    public String getMode() {
071        return mode;
072    }
073
074    public void setMode(String mode) {
075        this.mode = mode;
076    }
077}