Package net.anotheria.anosite.handler
Interface BoxHandler
-
- All Known Implementing Classes:
AbstractBoxHandler,AbstractValidationBoxHandler,BoxHandlerWrapper,DefaultStepCommandsHandler,ImageBrowserHandler,NoneHandler,RedirectImmediatelyHandler
public interface BoxHandlerA boxhandler can be attached to any box. Upon processing of a request for each box, its box handler (if set) will be instantiated and the methods submit and process called on it. First all submit methods are called, than all process methods. Submit methods are only called if the request has been a form submission. In one request submit and process will be called on the same handler instance, so the handler itself is allowed to be non-reentrant and store data in instance variables for the duration of one request.- Author:
- another
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description BoxHandlerResponseprocess(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse res, Box box, BoxBean bean)Called in second processing cycle.BoxHandlerResponsesubmit(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse res, Box box)Called in first processing cycle if a form submit has been detected (post requst or special indicator parameters).
-
-
-
Method Detail
-
submit
BoxHandlerResponse submit(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse res, Box box) throws BoxHandleException
Called in first processing cycle if a form submit has been detected (post requst or special indicator parameters). Note: Usage of submit in handlers is discouraged, use actions whenever possible.- Parameters:
req- requestres- responsebox- box itself- Returns:
- response
- Throws:
BoxHandleException- on handle errors
-
process
BoxHandlerResponse process(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse res, Box box, BoxBean bean) throws BoxHandleException
Called in second processing cycle.- Parameters:
req- the http servlet requestres- the http servlet responsebox- the box this handler has been associated with (and which was currently processed).bean- the already created bean.- Returns:
- response
- Throws:
BoxHandleException- on handle errors
-
-