lcanals.tc.web
Class GeneralController
lcanals.tc.web.GeneralController
- Direct Known Subclasses:
- ManageEstimatorController, PersonalPlanController
- public class GeneralController
Base servlet for controllers.
Initializes internal table of events (eventHandlers
)
and offers functions to process an event (processEvent
).
Child classes must call init
method before inserting
their own events.
Field Summary |
protected java.util.HashMap |
eventHandlers
Relationships between event string and event handler object |
Method Summary |
void |
init()
Initializes event handlers table and factory of entities. |
protected void |
processEvent(java.lang.String eventString,
lcanals.tc.web.HttpServletRequest request,
lcanals.tc.web.HttpServletResponse response)
Process the event, executing it and forwarding to the desired
page (or to error page if an exception occurs). |
eventHandlers
protected java.util.HashMap eventHandlers
- Relationships between event string and event handler object
GeneralController
public GeneralController()
init
public void init()
throws javax.servlet.ServletException
- Initializes event handlers table and factory of entities.
processEvent
protected void processEvent(java.lang.String eventString,
lcanals.tc.web.HttpServletRequest request,
lcanals.tc.web.HttpServletResponse response)
throws javax.servlet.ServletException,
java.io.IOException
- Process the event, executing it and forwarding to the desired
page (or to error page if an exception occurs).
Call this function from doGet/doPost when you know the name
of the event you received.
Luis F. Canals. Supported by www.sourceforge.net