org.apache.struts.taglib.tiles
public class InsertTag extends DefinitionTagSupport implements PutTagParent, ComponentConstants, PutListTagParent
Version: $Rev: 165160 $ $Date: 2005-04-28 17:29:58 +0100 (Thu, 28 Apr 2005) $
Nested Class Summary | |
---|---|
protected class | InsertTag.DirectStringHandler
Handle insert direct string. |
protected class | InsertTag.InsertHandler
Real handler, after attribute resolution.
|
protected interface | InsertTag.TagHandler
Inner Interface.
|
Field Summary | |
---|---|
protected String | attribute
Name of attribute from which to read page name to include. |
protected String | beanName
Name of bean used as entity to include. |
protected String | beanProperty
Name of bean property, if any. |
protected String | beanScope
Scope of bean, if any. |
protected ComponentContext | cachedCurrentContext
Current component context. |
protected String | definitionName
Name of component instance to include. |
protected boolean | flush
Flush attribute value. |
protected boolean | isErrorIgnored
Are errors ignored. |
protected static Log | log
Commons Logging instance. |
protected String | name
Name to insert. |
protected PageContext | pageContext
Trick to allows inner classes to access pageContext. |
protected boolean | processEndTag
Does the end tag need to be processed.
|
static String | ROLE_DELIMITER
The role delimiter. |
protected InsertTag.TagHandler | tagHandler
Final handler of tag methods. |
Method Summary | |
---|---|
InsertTag.TagHandler | createTagHandler()
Process tag attribute and create corresponding tag handler. |
int | doEndTag()
Process the end tag by including the template.
|
protected void | doInclude(String page)
Do an include of specified page.
|
int | doStartTag()
Process the start tag by checking tag's attributes and creating appropriate handler.
|
String | getBeanName()
Get bean name. |
String | getBeanProperty()
Get bean property. |
String | getBeanScope()
Get bean scope. |
Controller | getController()
Get instantiated Controller.
|
ComponentContext | getCurrentContext()
Get current component context. |
String | getDefinitionName()
Get definition name. |
boolean | getFlush()
Get flush. |
boolean | getIgnore()
Get ignore. |
String | getName()
Get name. |
PageContext | getPageContext()
Get the pageContext property. |
InsertTag.TagHandler | processAsDefinitionOrURL(String name)
Try to process name as a definition, or as an URL if not found. |
InsertTag.TagHandler | processAttribute(String name)
Process tag attribute "attribute".
|
protected InsertTag.TagHandler | processBean(String beanName, String beanProperty, String beanScope)
Process a bean.
|
protected InsertTag.TagHandler | processDefinition(ComponentDefinition definition)
End of Process tag attribute "definition".
|
protected InsertTag.TagHandler | processDefinitionName(String name)
Process tag attribute "definition".
|
InsertTag.TagHandler | processName(String name)
Process name.
|
void | processNestedTag(PutTag nestedTag)
Process nested ≶put> tag.
|
void | processNestedTag(PutListTag nestedTag)
Process nested ≶putList> tag.
|
InsertTag.TagHandler | processObjectValue(Object value)
Process an object retrieved as a bean or attribute.
|
InsertTag.TagHandler | processTypedAttribute(AttributeDefinition value)
Process typed attribute according to its type. |
InsertTag.TagHandler | processUrl(String url)
Process the url. |
void | putAttribute(String name, Object value)
Add a body attribute.
|
void | putAttribute(PutListTag nestedTag)
Method calls by nested ≶putList> tags.
|
void | release()
Reset member values for reuse. |
protected void | releaseInternal()
Reset internal member values for reuse. |
void | setAttribute(String value)
Set attribute. |
void | setBeanName(String value)
Set bean name. |
void | setBeanProperty(String value)
Set bean property. |
void | setBeanScope(String value)
Set bean scope. |
void | setComponent(String name)
Set component. |
void | setDefinition(String name)
Set definition. |
void | setFlush(boolean flush)
Set flush. |
void | setFlush(String flush)
Set flush.
|
void | setIgnore(boolean ignore)
Set ignore. |
void | setName(String value)
Set name. |
void | setPageContext(PageContext pc)
Set the current page context.
|
static boolean | userHasRole(HttpServletRequest request, String role)
Parse the list of roles and return true or false based on whether
the user has that role or not. |
Deprecated: This will be removed in a release after Struts 1.2.
The role delimiter.Parameters: page The page that will be included
Throws: ServletException - Thrown by call to pageContext.include() IOException - Thrown by call to pageContext.include()
null
if controllerType
is null.Throws: JspException If controller can't be created.
Parameters: name Name to process.
Returns: appropriate TagHandler
Throws: JspException InstantiationException Can't create requested controller
Parameters: name Name of the attribute.
Returns: Appropriate TagHandler.
Throws: JspException - NoSuchDefinitionException No Definition found for name. JspException - Throws by underlying nested call to processDefinitionName()
Parameters: beanName Name of the bean beanProperty Property in the bean, or null. beanScope bean scope, or null.
Returns: Appropriate TagHandler.
Throws: JspException - NoSuchDefinitionException No value associated to bean. JspException an error occur while reading bean, or no definition found. JspException - Throws by underlying nested call to processDefinitionName()
Parameters: definition Definition to process.
Returns: Appropriate TagHandler.
Throws: JspException InstantiationException Can't create requested controller
Parameters: name Name of the definition.
Returns: Appropriate TagHandler.
Throws: JspException- NoSuchDefinitionException No Definition found for name. JspException- FactoryNotFoundException Can't find Definitions factory. JspException- DefinedComponentFactoryException General error in factory. JspException InstantiationException Can't create requested controller
Returns: appropriate tag handler.
Throws: JspException - Throws by underlying nested call to processDefinitionName()
Throws: JspException - Throws by underlying nested call to processDefinitionName()
Parameters: value Typed attribute to process.
Returns: appropriate TagHandler.
Throws: JspException - Throws by underlying nested call to processDefinitionName()
Throws: JspException If failed to create controller
Needed to allow inner classes to access pageContext.
true
or false
based on whether
the user has that role or not.Parameters: role Comma-delimited list of roles. request The request.