FileDocCategorySizeDatePackage
ComponentTagSupport.javaAPI DocExample2521Mon Jul 23 13:26:50 BST 2007org.apache.struts2.views.jsp

ComponentTagSupport

public abstract class ComponentTagSupport extends StrutsBodyTagSupport

Fields Summary
protected org.apache.struts2.components.Component
component
Constructors Summary
Methods Summary
public intdoEndTag()

        component.end(pageContext.getOut(), getBody());
        component = null;
        return EVAL_PAGE;
    
public intdoStartTag()

        component = getBean(getStack(), (HttpServletRequest) pageContext.getRequest(), (HttpServletResponse) pageContext.getResponse());
        Container container = Dispatcher.getInstance().getContainer();
        container.inject(component);
        
        populateParams();
        boolean evalBody = component.start(pageContext.getOut());

        if (evalBody) {
            return component.usesBody() ? EVAL_BODY_BUFFERED : EVAL_BODY_INCLUDE;
        } else {
            return SKIP_BODY;
        }
    
public abstract org.apache.struts2.components.ComponentgetBean(com.opensymphony.xwork2.util.ValueStack stack, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)

public org.apache.struts2.components.ComponentgetComponent()

        return component;
    
protected voidpopulateParams()

        component.setId(id);