/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.corejsf;

import javax.el.ValueExpression;
import javax.faces.application.Application;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.webapp.UIComponentELTag;


/**
 *
 * @author Ivan
 */
public class AccordionTag extends UIComponentELTag {

    private ValueExpression name = null;
    private ValueExpression panelHeight = null;
    private ValueExpression styleClass = null;
    private ValueExpression panelClass = null;
    private ValueExpression headerClass = null;
    private ValueExpression contentClass = null;

    public String getComponentType() {
        return "com.corejsf.Accordion";
    }

    public String getRendererType() {
        return "com.corejsf.AccordionRenderer";
    }

    public void setName(ValueExpression name) {
        this.name = name;
    }

    public void setPanelHeight(ValueExpression panelHeight) {
        this.panelHeight = panelHeight;
    }

    public void setStyleClass(ValueExpression styleClass) {
        this.styleClass = styleClass;
    }

    public void setPanelClass(ValueExpression panelClass) {
        this.panelClass = panelClass;
    }

    public void setHeaderClass(ValueExpression headerClass) {
        this.headerClass = headerClass;
    }

    public void setContentClass(ValueExpression contentClass) {
        this.contentClass = contentClass;
    }

    public void setProperties(UIComponent component) {
        super.setProperties(component);
        component.setValueExpression("name", name);
        component.setValueExpression("styleClass", styleClass);
        component.setValueExpression("panelClass", panelClass);
        component.setValueExpression("headerClass", headerClass);
        component.setValueExpression("contentClass", contentClass);
        component.setValueExpression("panelHeight", panelHeight);
    }

    public void release() {
        super.release();
        name = null;
        setPanelHeight(null);
        styleClass = null;
        panelClass = null;
        headerClass = null;
        contentClass = null;

    }
}
