org.apache.struts.taglib.tiles

Class InsertTag.InsertHandler

Enclosing Class:
InsertTag
Implemented Interfaces:
InsertTag.TagHandler

protected class InsertTag.InsertHandler
extends java.lang.Object
implements InsertTag.TagHandler

Real handler, after attribute resolution. Handle include sub-component.

Field Summary

protected Controller
controller
protected ComponentContext
currentContext
protected String
page
protected String
role
protected ComponentContext
subCompContext

Constructor Summary

InsertHandler(Map attributes, String page, String role, Controller controller)
Constructor.
InsertHandler(String page, String role, Controller controller)
Constructor.

Method Summary

int
doEndTag()
Include requested page.
int
doStartTag()
Create a new empty context.
protected void
processException(Throwable ex, String msg)
Deprecated. This method will be removed in a release after Struts 1.2.
void
putAttribute(String name, Object value)
Add attribute to sub context.

Field Details

controller

protected Controller controller

currentContext

protected ComponentContext currentContext

page

protected String page

role

protected String role

subCompContext

protected ComponentContext subCompContext

Constructor Details

InsertHandler

public InsertHandler(Map attributes,
                     String page,
                     String role,
                     Controller controller)
Constructor. Create insert handler using Component definition.

InsertHandler

public InsertHandler(String page,
                     String role,
                     Controller controller)
Constructor. Create insert handler to insert page at specified location.

Method Details

doEndTag

public int doEndTag()
            throws JspException
Include requested page.
Specified by:
doEndTag in interface InsertTag.TagHandler

doStartTag

public int doStartTag()
            throws JspException
Create a new empty context.
Specified by:
doStartTag in interface InsertTag.TagHandler

processException

protected void processException(Throwable ex,
                                String msg)
            throws JspException

Deprecated. This method will be removed in a release after Struts 1.2.

Process an exception. Depending of debug attribute, print full exception trace or only its message in output page.
Parameters:
ex - Exception
msg - An additional message to show in console and to propagate if we can't output exception.

putAttribute

public void putAttribute(String name,
                         Object value)
Add attribute to sub context. Do nothing.
Specified by:
putAttribute in interface InsertTag.TagHandler

Copyright B) 2000-2007 - The Apache Software Foundation