lcanals.tc.web.event.estimator
Class SeeEstimatorEvent

java.lang.Object
  |
  +--lcanals.tc.web.event.estimator.SeeEstimatorEvent
All Implemented Interfaces:
EventHandler

public class SeeEstimatorEvent
extends java.lang.Object
implements EventHandler

Event to see information about user's estimator. Forwards to a JSP page with the name of the estimator type plus "Show.jsp". Sets or obtains from session user's estimator (with name "estimator").


Fields inherited from interface lcanals.tc.web.event.EventHandler
DEFAULT_EVENT, ERROR_EVENT
 
Constructor Summary
SeeEstimatorEvent()
           
 
Method Summary
 void forward(javax.servlet.ServletContext context, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Redirects the response to a specific view.
 void process(javax.servlet.ServletContext context, javax.servlet.http.HttpServletRequest request)
          Process the received parameters from the request.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SeeEstimatorEvent

public SeeEstimatorEvent()
Method Detail

process

public void process(javax.servlet.ServletContext context,
                    javax.servlet.http.HttpServletRequest request)
             throws EventHandlerException
Process the received parameters from the request. If an error occurs, can throws a ServletException or stores it into the request as an attribute; then when forward were called, can be send to a specific error page which can permit correct the error (the case, for example, of misscompleted parameters in a form)
Specified by:
process in interface EventHandler
Throws:
EventHandlerException - when is no possible to process the request (usually due to crack intends)

forward

public void forward(javax.servlet.ServletContext context,
                    javax.servlet.http.HttpServletRequest request,
                    javax.servlet.http.HttpServletResponse response)
             throws java.io.IOException,
                    javax.servlet.ServletException
Redirects the response to a specific view. Fills up the session/request/context with the suitable beans for the view.
URLs can be read from a file A recommended behaviour, when error occurs, could be take the error from the request (as an attribute) and redirect to an error view.
Specified by:
forward in interface EventHandler


Luis F. Canals. Supported by www.sourceforge.net