package nuts.exts.struts2.views.velocity.components;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import nuts.exts.struts2.components.Button;

import org.apache.struts2.components.Component;
import org.apache.struts2.views.velocity.components.AbstractDirective;

import com.opensymphony.xwork2.util.ValueStack;

/**
 * @see Button
 */
public class ButtonDirective extends AbstractDirective {
    public String getBeanName() {
        return "b";
    }

    protected Component getBean(ValueStack stack, HttpServletRequest req, HttpServletResponse res) {
        return new Button(stack, req, res);
    }

    public int getType() {
        return BLOCK;
    }
}
