org.hdiv.tiles
Class HDIVTilesRequestProcessor
java.lang.Object
org.apache.struts.action.RequestProcessor
org.apache.struts.tiles.TilesRequestProcessor
org.hdiv.tiles.HDIVTilesRequestProcessor
public class HDIVTilesRequestProcessor
- extends org.apache.struts.tiles.TilesRequestProcessor
RequestProcessor contains the processing logic that
the Struts controller servlet performs as it receives each servlet request
from the container.
This processor subclasses the Struts RequestProcessor in order to intercept calls to forward
or include. When such calls are done, the Tiles processor checks if the specified URI
is a definition name. If true, the definition is retrieved and included. If
false, the original URI is included or a forward is performed.
Actually, catching is done by overloading the following methods:
TilesRequestProcessor.processForwardConfig(HttpServletRequest,HttpServletResponse,ForwardConfig)
TilesRequestProcessor.internalModuleRelativeForward(String, HttpServletRequest , HttpServletResponse)
TilesRequestProcessor.internalModuleRelativeInclude(String, HttpServletRequest , HttpServletResponse)
- Since:
- HDIV 1.1.2
- Author:
- Gorka Vicente
- See Also:
TilesRequestProcessor
| Fields inherited from class org.apache.struts.tiles.TilesRequestProcessor |
definitionsFactory, log |
| Fields inherited from class org.apache.struts.action.RequestProcessor |
actions, INCLUDE_PATH_INFO, INCLUDE_SERVLET_PATH, moduleConfig, servlet |
|
Method Summary |
java.lang.String |
createMessageError(java.lang.String[] values)
It creates the message error from the values values. |
org.apache.struts.action.ActionMessages |
getEditableParametersErrors(javax.servlet.http.HttpServletRequest request)
Obtains the errors detected by HDIV during the validation process of the
editable parameters. |
protected boolean |
processValidate(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.apache.struts.action.ActionForm form,
org.apache.struts.action.ActionMapping mapping)
If this request was not cancelled, and the request's ActionMapping has
not disabled validation, call the validate method of the
specified ActionForm, and forward to the input path if there were any
errors. |
| Methods inherited from class org.apache.struts.tiles.TilesRequestProcessor |
doForward, getDefinitionsFactory, init, initDefinitionsMapping, internalModuleRelativeForward, internalModuleRelativeInclude, processForwardConfig, processTilesDefinition |
| Methods inherited from class org.apache.struts.action.RequestProcessor |
destroy, doInclude, getInternal, getServletContext, log, log, process, processActionCreate, processActionForm, processActionPerform, processCachedMessages, processContent, processException, processForward, processInclude, processLocale, processMapping, processMultipart, processNoCache, processPath, processPopulate, processPreprocess, processRoles |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HDIVTilesRequestProcessor
public HDIVTilesRequestProcessor()
processValidate
protected boolean processValidate(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.apache.struts.action.ActionForm form,
org.apache.struts.action.ActionMapping mapping)
throws java.io.IOException,
javax.servlet.ServletException
If this request was not cancelled, and the request's ActionMapping has
not disabled validation, call the validate method of the
specified ActionForm, and forward to the input path if there were any
errors. Return true if we should continue processing, or
false if we have already forwarded control back to the input
form.
- Overrides:
processValidate in class org.apache.struts.action.RequestProcessor
- Parameters:
request - The servlet request we are processingresponse - The servlet response we are creatingform - The ActionForm instance we are populatingmapping - The ActionMapping we are using
- Throws:
java.io.IOException - if an input/output error occurs
javax.servlet.ServletException - if a servlet exception occurs
getEditableParametersErrors
public org.apache.struts.action.ActionMessages getEditableParametersErrors(javax.servlet.http.HttpServletRequest request)
- Obtains the errors detected by HDIV during the validation process of the
editable parameters.
- Parameters:
request - The servlet request we are processing
- Returns:
- errors detected by HDIV during the validation process of the editable
parameters.
createMessageError
public java.lang.String createMessageError(java.lang.String[] values)
- It creates the message error from the values
values.
- Parameters:
values - values with not allowed characters
- Returns:
- message error to show
Copyright © 2008 hdiv.org. All Rights Reserved.