Package org.apache.tiles
Class TilesContainerWrapper
java.lang.Object
org.apache.tiles.TilesContainerWrapper
- All Implemented Interfaces:
TilesContainer
- Direct Known Subclasses:
CachingTilesContainer
Wraps a Tiles container to allow easy decoration.
- Version:
- $Rev: 1044659 $ $Date: 2010-12-12 01:16:04 +1100 (Sun, 12 Dec 2010) $
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidendContext(org.apache.tiles.request.Request request) Ends a context, where attribute values are stored independently from others.
It must be called after aTilesContainer.startContext(Request)call.Evaluates the given attribute.org.apache.tiles.request.ApplicationContextRetrieve the containers context.getAttributeContext(org.apache.tiles.request.Request request) Retrive the attribute context of the current request.getDefinition(String definitionName, org.apache.tiles.request.Request request) Returns a definition specifying its name.Returns the wrapped container.booleanisValidDefinition(String definition, org.apache.tiles.request.Request request) Determine whether or not the definition exists.voidExecutes a preparer.voidRender the given tiles request.voidRender the given Attribute.voidrender(Definition definition, org.apache.tiles.request.Request request) Renders the specified definition.voidrenderContext(org.apache.tiles.request.Request request) Renders the current context, as it is.startContext(org.apache.tiles.request.Request request) Starts a new context, where attribute values are stored independently from others.
When the use of the contexts is finished, callTilesContainer.endContext(Request)
-
Field Details
-
container
The container to wrap.
-
-
Constructor Details
-
TilesContainerWrapper
Constructor.- Parameters:
container- The container to wrap.
-
-
Method Details
-
getWrappedContainer
Returns the wrapped container.- Returns:
- The wrapped container.
-
endContext
public void endContext(org.apache.tiles.request.Request request) Description copied from interface:TilesContainerEnds a context, where attribute values are stored independently from others.
It must be called after aTilesContainer.startContext(Request)call.- Specified by:
endContextin interfaceTilesContainer- Parameters:
request- The request.
-
evaluate
Description copied from interface:TilesContainerEvaluates the given attribute.- Specified by:
evaluatein interfaceTilesContainer- Parameters:
attribute- The attribute to evaluate.request- The request.- Returns:
- The evaluated object.
-
getApplicationContext
public org.apache.tiles.request.ApplicationContext getApplicationContext()Description copied from interface:TilesContainerRetrieve the containers context.- Specified by:
getApplicationContextin interfaceTilesContainer- Returns:
- current application context
-
getAttributeContext
Description copied from interface:TilesContainerRetrive the attribute context of the current request.- Specified by:
getAttributeContextin interfaceTilesContainer- Parameters:
request- The request.- Returns:
- map of the attributes in the current attribute context.
-
getDefinition
Description copied from interface:TilesContainerReturns a definition specifying its name.- Specified by:
getDefinitionin interfaceTilesContainer- Parameters:
definitionName- The name of the definition to find.request- The request context.- Returns:
- The definition, if found.
-
isValidDefinition
Description copied from interface:TilesContainerDetermine whether or not the definition exists.- Specified by:
isValidDefinitionin interfaceTilesContainer- Parameters:
definition- the name of the definition.request- The request.- Returns:
- true if the definition is found.
-
prepare
Description copied from interface:TilesContainerExecutes a preparer.- Specified by:
preparein interfaceTilesContainer- Parameters:
preparer- The name of the preparer to execute.request- The request.
-
render
Description copied from interface:TilesContainerRender the given tiles request.- Specified by:
renderin interfaceTilesContainer- Parameters:
definition- the current definition.request- The request.
-
render
Description copied from interface:TilesContainerRenders the specified definition.- Specified by:
renderin interfaceTilesContainer- Parameters:
definition- The definition to render.request- The request context.
-
render
public void render(Attribute attribute, org.apache.tiles.request.Request request) throws IOException Description copied from interface:TilesContainerRender the given Attribute.- Specified by:
renderin interfaceTilesContainer- Parameters:
attribute- The attribute to render.request- The request.- Throws:
IOException- If something goes wrong during writing to the output.
-
renderContext
public void renderContext(org.apache.tiles.request.Request request) Description copied from interface:TilesContainerRenders the current context, as it is.- Specified by:
renderContextin interfaceTilesContainer- Parameters:
request- The request.
-
startContext
Description copied from interface:TilesContainerStarts a new context, where attribute values are stored independently from others.
When the use of the contexts is finished, callTilesContainer.endContext(Request)- Specified by:
startContextin interfaceTilesContainer- Parameters:
request- The request.- Returns:
- The newly created context.
-