
public class BasicTilesContainer extends Object implements TilesContainer, AttributeEvaluatorFactoryAware
| Constructor and Description |
|---|
BasicTilesContainer() |
| Modifier and Type | Method and Description |
|---|---|
void |
endContext(org.apache.tiles.request.Request request)
Ends a context, where attribute values are stored independently
from others.
It must be called after a TilesContainer.startContext(Request) call. |
Object |
evaluate(Attribute attribute,
org.apache.tiles.request.Request request)
Evaluates the given attribute.
|
org.apache.tiles.request.ApplicationContext |
getApplicationContext()
Returns the Tiles application context used by this container.
|
AttributeContext |
getAttributeContext(org.apache.tiles.request.Request request)
Retrive the attribute context of the current request.
|
protected AttributeContext |
getContext(org.apache.tiles.request.Request tilesContext)
Get attribute context from request.
|
protected Deque<AttributeContext> |
getContextStack(org.apache.tiles.request.Request tilesContext)
Returns the context stack.
|
Definition |
getDefinition(String definitionName,
org.apache.tiles.request.Request request)
Returns a definition specifying its name.
|
DefinitionsFactory |
getDefinitionsFactory()
Returns the definitions factory.
|
PreparerFactory |
getPreparerFactory()
Returns the preparer factory used by this container.
|
boolean |
isValidDefinition(String definitionName,
org.apache.tiles.request.Request request)
Determine whether or not the definition exists.
|
protected AttributeContext |
popContext(org.apache.tiles.request.Request tilesContext)
Pops a context object out of the stack.
|
void |
prepare(String preparer,
org.apache.tiles.request.Request request)
Executes a preparer.
|
protected void |
pushContext(AttributeContext context,
org.apache.tiles.request.Request tilesContext)
Pushes a context object in the stack.
|
void |
render(Attribute attr,
org.apache.tiles.request.Request request)
Render the given Attribute.
|
void |
render(Definition definition,
org.apache.tiles.request.Request request)
Renders the specified definition.
|
protected void |
render(org.apache.tiles.request.Request request,
AttributeContext attributeContext)
Renders the specified attribute context.
|
void |
render(String definitionName,
org.apache.tiles.request.Request request)
Render the given tiles request.
|
void |
renderContext(org.apache.tiles.request.Request request)
Renders the current context, as it is.
|
void |
setApplicationContext(org.apache.tiles.request.ApplicationContext context)
Sets the Tiles application context to use.
|
void |
setAttributeEvaluatorFactory(AttributeEvaluatorFactory attributeEvaluatorFactory)
Sets the attribute evaluator factory.
|
void |
setDefinitionsFactory(DefinitionsFactory definitionsFactory)
Set the definitions factory.
|
void |
setPreparerFactory(PreparerFactory preparerFactory)
Set the preparerInstance factory.
|
void |
setRendererFactory(org.apache.tiles.request.render.RendererFactory rendererFactory)
Sets the renderer instance factory.
|
AttributeContext |
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, call TilesContainer.endContext(Request) |
public AttributeContext startContext(org.apache.tiles.request.Request request)
TilesContainer.endContext(Request)startContext in interface TilesContainerrequest - The request.public void endContext(org.apache.tiles.request.Request request)
TilesContainer.startContext(Request) call.endContext in interface TilesContainerrequest - The request.public void renderContext(org.apache.tiles.request.Request request)
renderContext in interface TilesContainerrequest - The request.public org.apache.tiles.request.ApplicationContext getApplicationContext()
getApplicationContext in interface TilesContainerpublic void setApplicationContext(org.apache.tiles.request.ApplicationContext context)
context - The Tiles application context.public AttributeContext getAttributeContext(org.apache.tiles.request.Request request)
getAttributeContext in interface TilesContainerrequest - The request.public DefinitionsFactory getDefinitionsFactory()
public void setDefinitionsFactory(DefinitionsFactory definitionsFactory)
definitionsFactory - the definitions factory for this instance.public PreparerFactory getPreparerFactory()
public void setPreparerFactory(PreparerFactory preparerFactory)
preparerFactory - the preparerInstance factory for this conainer.public void setRendererFactory(org.apache.tiles.request.render.RendererFactory rendererFactory)
rendererFactory - the renderer instance factory for this container.public void setAttributeEvaluatorFactory(AttributeEvaluatorFactory attributeEvaluatorFactory)
setAttributeEvaluatorFactory in interface AttributeEvaluatorFactoryAwareattributeEvaluatorFactory - The attribute evaluator factory to use.public void prepare(String preparer, org.apache.tiles.request.Request request)
prepare in interface TilesContainerpreparer - The name of the preparer to execute.request - The request.public void render(String definitionName, org.apache.tiles.request.Request request)
render in interface TilesContainerdefinitionName - the current definition.request - The request.public void render(Definition definition, org.apache.tiles.request.Request request)
render in interface TilesContainerdefinition - The definition to render.request - The request context.public void render(Attribute attr, org.apache.tiles.request.Request request) throws IOException
render in interface TilesContainerattr - The attribute to render.request - The request.IOException - If something goes wrong during writing to the output.public Object evaluate(Attribute attribute, org.apache.tiles.request.Request request)
evaluate in interface TilesContainerattribute - The attribute to evaluate.request - The request.public boolean isValidDefinition(String definitionName, org.apache.tiles.request.Request request)
isValidDefinition in interface TilesContainerdefinitionName - the name of the definition.request - The request.public Definition getDefinition(String definitionName, org.apache.tiles.request.Request request)
getDefinition in interface TilesContainerdefinitionName - The name of the definition to find.request - The request context.protected Deque<AttributeContext> getContextStack(org.apache.tiles.request.Request tilesContext)
tilesContext - The Tiles context object to use.protected void pushContext(AttributeContext context, org.apache.tiles.request.Request tilesContext)
context - The context to push.tilesContext - The Tiles context object to use.protected AttributeContext popContext(org.apache.tiles.request.Request tilesContext)
tilesContext - The Tiles context object to use.protected AttributeContext getContext(org.apache.tiles.request.Request tilesContext)
tilesContext - current Tiles application context.protected void render(org.apache.tiles.request.Request request,
AttributeContext attributeContext)
request - The request context.attributeContext - The context to render.InvalidTemplateException - If the template is not valid.org.apache.tiles.request.render.CannotRenderException - If something goes wrong during rendering.Copyright © 2001-2017 The Apache Software Foundation. All Rights Reserved.