|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.struts.tiles.ComponentContext
Component context.
Field Summary | |
private java.util.Map |
attributes
Component attributes. |
private static java.util.Iterator |
EMPTY_ITERATOR
EmptyIterator over component attributes. |
Constructor Summary | |
ComponentContext()
Constructor. |
|
ComponentContext(ComponentDefinition instance)
Deprecated. Use ComponentContext(Map attributes) instead. |
|
ComponentContext(java.util.Map attributes)
Constructor. |
Method Summary | |
void |
addAll(java.util.Map newAttributes)
Add all attributes to this context. |
void |
addMissing(java.util.Map defaultAttributes)
Add all missing attributes to this context. |
java.lang.Object |
findAttribute(java.lang.String beanName,
javax.servlet.jsp.PageContext pageContext)
Find object in one of the contexts. |
java.lang.Object |
getAttribute(java.lang.String name)
Get an attribute from context. |
java.lang.Object |
getAttribute(java.lang.String beanName,
int scope,
javax.servlet.jsp.PageContext pageContext)
Get object from requested context. |
java.util.Iterator |
getAttributeNames()
Get names of all attributes. |
static ComponentContext |
getContext(javax.servlet.ServletRequest request)
Get component context from request. |
void |
putAttribute(java.lang.String name,
java.lang.Object value)
Put a new attribute to context. |
static void |
setContext(ComponentContext context,
javax.servlet.ServletRequest request)
Store component context into request. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private java.util.Map attributes
private static java.util.Iterator EMPTY_ITERATOR
Constructor Detail |
public ComponentContext()
public ComponentContext(ComponentDefinition instance)
ComponentContext(Map attributes)
instead.
public ComponentContext(java.util.Map attributes)
attributes
- Attributes to initialize context.Method Detail |
public void addAll(java.util.Map newAttributes)
newAttributes
- Attributes to add.public void addMissing(java.util.Map defaultAttributes)
defaultAttributes
- Attributes to add.public java.lang.Object getAttribute(java.lang.String name)
name
- Name of the attribute.
public java.util.Iterator getAttributeNames()
public void putAttribute(java.lang.String name, java.lang.Object value)
name
- Name of the attribute.value
- Value of the attribute.public java.lang.Object findAttribute(java.lang.String beanName, javax.servlet.jsp.PageContext pageContext)
beanName
- Name of the bean to find.pageContext
- Page context.
null
if not found.public java.lang.Object getAttribute(java.lang.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.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |