@Regenerable public abstract class EventHandler extends AbstractHandler
A plain handler has a void run
method that is invoked when the event occurs.
The run
method for a handler that has been constructed with a session argument returns
an XML value. This XML value can be obtained from an XML producer via getProducer()
.
The run
methods may take parameters corresponding to form field values.
CACHE_PRIORITY, context, HANDLERS, JWIG_DEFUNCT_SESSION, log, MAX_PRIORITY, PRE_CACHE
Constructor and Description |
---|
EventHandler(boolean value,
Object... dependencies)
Constructs a new event handler with a JavaScript boolean value.
|
EventHandler(boolean value,
Session ses,
Object... dependencies)
Constructs a new event handler with a JavaScript boolean value and a session.
|
EventHandler(Object... dependencies)
Constructs a new event handler.
|
EventHandler(Session ses)
Constructs a new event handler with a session.
|
Modifier and Type | Method and Description |
---|---|
String |
getHandlerIdentifier()
Returns the JavaScript instruction for running this event handler.
|
XMLProducer |
getProducer()
Creates an XML producer for this event handler.
|
void |
setLatestReturnValue(XML val)
Invoked by the runtime system after the
run method has been invoked
to store the resulting XML value for the XML producer, and then notifies
listeners of the XML producer. |
destroy, hashCode, process, toString
addCookie, addResponseInvalidator, augment, cache, getCacheAugmentedString, getCookies, getRequestURL, getResponse, getServletContext, getServletRequest, getServletResponse, getUser, getWebAppParam, getWebAppParam, getWebAppURL, getWebSite, getWebSiteURL, getWebSiteURL, handlers, handleUpdatedObjects, isSecure, jwigJS, main, makeURL, makeURL, makeURL, makeURL, makeURL, makeURL, makeURL, next, punish, sendEmail, sendEmails, sendEmailsAsynchronously, sendResponse, touchSessions, transportSessionHandlers, update
public EventHandler(boolean value, Object... dependencies)
public EventHandler(boolean value, Session ses, Object... dependencies)
public EventHandler(Object... dependencies)
public EventHandler(Session ses)
public final String getHandlerIdentifier()
getHandlerIdentifier
in class AbstractHandler
public XMLProducer getProducer()
public void setLatestReturnValue(XML val)
run
method has been invoked
to store the resulting XML value for the XML producer, and then notifies
listeners of the XML producer.Copyright © 2008-2012 Anders Møller & Mathias Schwarz.