public class ComponentContext extends Object implements Serializable
Constructor and Description |
---|
ComponentContext()
Constructor.
|
ComponentContext(Map attributes)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addAll(Map newAttributes)
Add all attributes to this context.
|
void |
addMissing(Map defaultAttributes)
Add all missing attributes to this context.
|
Object |
findAttribute(String beanName,
javax.servlet.jsp.PageContext pageContext)
Find object in one of the contexts.
|
Object |
getAttribute(String name)
Get an attribute from context.
|
Object |
getAttribute(String beanName,
int scope,
javax.servlet.jsp.PageContext pageContext)
Get object from requested context.
|
Iterator |
getAttributeNames()
Get names of all attributes.
|
static ComponentContext |
getContext(javax.servlet.ServletRequest request)
Get component context from request.
|
void |
putAttribute(String name,
Object value)
Put a new attribute to context.
|
static void |
setContext(ComponentContext context,
javax.servlet.ServletRequest request)
Store component context into request.
|
public ComponentContext()
public ComponentContext(Map attributes)
attributes
- Attributes to initialize context.public void addAll(Map newAttributes)
newAttributes
- Attributes to add.public void addMissing(Map defaultAttributes)
defaultAttributes
- Attributes to add.public Object getAttribute(String name)
name
- Name of the attribute.public Iterator getAttributeNames()
public void putAttribute(String name, Object value)
name
- Name of the attribute.value
- Value of the attribute.public Object findAttribute(String beanName, javax.servlet.jsp.PageContext pageContext)
beanName
- Name of the bean to find.pageContext
- Page context.null
if not found.public Object getAttribute(String beanName, int scope, javax.servlet.jsp.PageContext pageContext)
beanName
- Name of the bean to find.scope
- Search scope (see PageContext
).pageContext
- Page context.null
if not found.public static ComponentContext getContext(javax.servlet.ServletRequest request)
request
- ServletRequest.public static void setContext(ComponentContext context, javax.servlet.ServletRequest request)
context
- ComponentContext to store.request
- Request to store ComponentContext.Copyright © 2000–2017 Apache Software Foundation. All rights reserved.