This class is deprecated.
Extend the AggregatedEventHandler
class
instead. Because we no longer differentiate between metadata and application event
handlers, we will support only a single aggregated event handler superclass.
Class Overview
This class is used to customize event-handlers.
When a user wants to extend the functionality of an existing event-handler, s/he needs
to extends this class. By doing this, all requests to process an event except the
ones that this new handler is interested in, would be delegated to the super class.
For example, the following code segment represents a custom handler that can be
associated with a PageBy bean:
public class CustomPageByHandler extends AggregatedAppEventHandler {
public CustomPageByHandler(){
super(EnumSysBeanTypes.AppBeanPageBy);
}
public boolean processRequest(RequestKeys keys) throws WebException {
//------------------------//
// process the event here //
//------------------------//
//or delegate it to the super class
return handleDefaultRequest(keys);
}
}
The custom handler that is created needs to be associated with the appropriated bean in order
for the processRequest on this handler to get invoked. This association is done in the
pageConfig.xml
.
Typically, the line in the
pageConfig.xml
which instantiates WebBean looks like
<web-bean name="pbb" persist-mode="2" sys-bean="PageByBean"/>
If we need to associate this web bean with a new event handler, the syntax for that would be
<web-bean name="pbb" persist-mode="2" sys-bean="PageByBean" event-handler="com.xyz.CustomPageByHandler"/>
Where com.xyz.CustomPageByHandler
is the fully qualified class name of the
new event handler class.
Note that this should be done for every page, in the file, where the bean is going to be
instantiated.