Class TilesPreProcessor
- All Implemented Interfaces:
org.apache.commons.chain.Command<ServletActionContext>
This class will never have any effect on the chain unless a
TilesDefinitionFactory
can be found; however it does not consider
the absence of a definition factory to be a fatal error; the command simply
returns false and lets the chain continue.
To initialize the TilesDefinitionFactory
, use
org.apache.struts.chain.commands.legacy.TilesPlugin
. This class is a
simple extension to org.apache.struts.tiles2.TilesPlugin
which
simply does not interfere with your choice of RequestProcessor
implementation.
-
Field Summary
Fields inherited from interface org.apache.commons.chain.Command
CONTINUE_PROCESSING, PROCESSING_COMPLETE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
execute
(ServletActionContext sacontext) If the currentForwardConfig
is using "tiles", perform necessary pre-processing to set up theTilesContext
and substitute a newForwardConfig
which is understandable to aRequestDispatcher
.
-
Constructor Details
-
TilesPreProcessor
public TilesPreProcessor()
-
-
Method Details
-
execute
If the currentForwardConfig
is using "tiles", perform necessary pre-processing to set up theTilesContext
and substitute a newForwardConfig
which is understandable to aRequestDispatcher
.Note that if the command finds a previously existing
AttributeContext
in the request, then it infers that it has been called from within another tile, so instead of changing theForwardConfig
in the chainContext
, the command usesRequestDispatcher
to include the tile, and returns true, indicating that the processing chain is complete.- Specified by:
execute
in interfaceorg.apache.commons.chain.Command<ServletActionContext>
- Parameters:
sacontext
- TheContext
for the current request- Returns:
false
in most cases, but true if we determine that we're processing in "include" mode.- Throws:
Exception
- If something goes wrong.
-