Package com.blackrook.small.roles
Interface ViewDriver
public interface ViewDriver
Describes a view resolution driver for Small.
When a EntryPath method returns a View, it is passed to one of these components to render.
There can be many components with this role - the handleView(HttpServletRequest, HttpServletResponse, Object, String) method
is called and if it returns false, the next ViewDriver is called, and if it returns true, handling stops.
- Author:
- Matthew Tropiano
-
Method Summary
Modifier and TypeMethodDescriptionbooleanhandleView(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Object model, String viewName) Called when a view needs to be rendered.
-
Method Details
-
handleView
boolean handleView(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Object model, String viewName) throws ViewProcessingException Called when a view needs to be rendered. Returningfalsewill pass this along to the next view resolution handler, and returningtruewill stop the chain.- Parameters:
request- the HTTP request object.response- the HTTP response object.model- the model to render using the view.viewName- the name of the view to handle.- Returns:
- true if the view was handled by this component, false if not.
- Throws:
ViewProcessingException- if an error occurs on view processing of any kind.
-