org.apache.struts.tiles
public class ComponentContext extends Object implements Serializable
| Field Summary | |
|---|---|
| Map | attributes
Component attributes. |
| Constructor Summary | |
|---|---|
| ComponentContext()
Constructor. | |
| ComponentContext(Map attributes)
Constructor.
| |
| Method Summary | |
|---|---|
| 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, PageContext pageContext)
Find object in one of the contexts.
|
| Object | getAttribute(String name)
Get an attribute from context. |
| Object | getAttribute(String beanName, int scope, PageContext pageContext)
Get object from requested context.
|
| Iterator | getAttributeNames()
Get names of all attributes. |
| static ComponentContext | getContext(ServletRequest request)
Get component context from request. |
| void | putAttribute(String name, Object value)
Put a new attribute to context. |
| static void | setContext(ComponentContext context, ServletRequest request)
Store component context into request. |
Parameters: attributes Attributes to initialize context.
Parameters: newAttributes Attributes to add.
Parameters: defaultAttributes Attributes to add.
Parameters: beanName Name of the bean to find. pageContext Page context.
Returns: Requested bean or null if not found.
Parameters: name Name of the attribute.
Returns: <{Object}>
Parameters: beanName Name of the bean to find. scope Search scope (see PageContext). pageContext Page context.
Returns: requested bean or null if not found.
Returns: <{Object}>
Parameters: request ServletRequest.
Returns: ComponentContext or null if context is not found or an jspException is present in the request.
Parameters: name Name of the attribute. value Value of the attribute.
Parameters: context ComponentContext to store. request Request to store ComponentContext.