Oracle UIX API Reference
Release 2.1.22.0.0
B12196-01

oracle.cabo.servlet.event
Class AbstractDataEventHandler

java.lang.Object
  |
  +--oracle.cabo.servlet.event.AbstractDataEventHandler
All Implemented Interfaces:
EventHandler
Direct Known Subclasses:
SetEventHandler

public abstract class AbstractDataEventHandler
extends java.lang.Object
implements EventHandler

AbstractDataEventHandler is the base implementation of the EventHandler interface which adds support for data binding attributes.

Subclasses should implement doHandleEvent and may override one or both of preHandleEvent and postHandleEvent.


Constructor Summary
AbstractDataEventHandler()
           
 
Method Summary
abstract  EventResult doHandleEvent(BajaContext context, Page page, PageEvent event)
          Handle an event.
protected  java.lang.Object getAttributeInternal(java.lang.String name)
          Returns the internal value for this names attribute.
protected  java.lang.Object getAttributeValue(BajaContext context, java.lang.String name)
          Returns the value for this named attribute, resolving any binding.
 java.lang.Object getAttributeValue(java.lang.String name)
          Returns the value for this named attribute.
protected  RenderingContext getRenderingContext(BajaContext context)
          Returns the rendering context to use when resolving bound values.
 EventResult handleEvent(BajaContext context, Page page, PageEvent event)
          Handle an event.
 void postHandleEvent(BajaContext context, Page page, PageEvent event)
          Post process an event.
 void preHandleEvent(BajaContext context, Page page, PageEvent event)
          Prepare to handle an event.
 void setAttributeBinding(java.lang.String name, BoundValue binding)
          Sets the binding for this named attribute.
protected  void setAttributeInternal(java.lang.String name, java.lang.Object value)
          Sets the internal value for this names attribute.
 void setAttributeValue(java.lang.String name, java.lang.Object value)
          Sets the value for this named attribute.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractDataEventHandler

public AbstractDataEventHandler()
Method Detail

handleEvent

public final EventResult handleEvent(BajaContext context,
                                     Page page,
                                     PageEvent event)
                              throws java.lang.Throwable
Handle an event. Clients return an EventResult object that encapsulates the resulsts. If handleEvent() returns null, the PageBroker will simply redisplay the same page. Otherwise, the result will be passed to the PageFlowEngine to determine the Page to render.

Note: while the Page object is mutable, any calls that set properties, etc., will be ignored unless the Page is itself returned inside the EventResult.

Specified by:
handleEvent in interface EventHandler
Parameters:
context - the BajaContext
page - the page the client is requesting
event - the event on that page, or null if the client is just requesting a page display
Returns:
an object encapsulating results of this event
Throws:
java.lang.Throwable - if any processing of the event fails

preHandleEvent

public void preHandleEvent(BajaContext context,
                           Page page,
                           PageEvent event)
                    throws java.lang.Throwable
Prepare to handle an event. Clients should override this method to perform initialization work prior to handling the event.

Parameters:
context - the BajaContext
page - the page the client is requesting
event - the event on that page, or null if the client is just requesting a page display
Throws:
java.lang.Throwable - if any pre-processing of the event fails

doHandleEvent

public abstract EventResult doHandleEvent(BajaContext context,
                                          Page page,
                                          PageEvent event)
                                   throws java.lang.Throwable
Handle an event. Clients return an EventResult object that encapsulates the resulsts. If handleEvent() returns null, the PageBroker will simply redisplay the same page. Otherwise, the result will be passed to the PageFlowEngine to determine the Page to render.

Clients should implement this method, instead of handleEvent, to perform the actual event handling logic.

Note: while the Page object is mutable, any calls that set properties, etc., will be ignored unless the Page is itself returned inside the EventResult.

Parameters:
context - the BajaContext
page - the page the client is requesting
event - the event on that page, or null if the client is just requesting a page display
Returns:
an object encapsulating results of this event
Throws:
java.lang.Throwable - if any processing of the event fails

postHandleEvent

public void postHandleEvent(BajaContext context,
                            Page page,
                            PageEvent event)
                     throws java.lang.Throwable
Post process an event. Clients should override this method to perform cleanup work after handling the event.

Parameters:
context - the BajaContext
page - the page the client is requesting
event - the event on that page, or null if the client is just requesting a page display
Throws:
java.lang.Throwable - if any pre-processing of the event fails

setAttributeValue

public final void setAttributeValue(java.lang.String name,
                                    java.lang.Object value)
Sets the value for this named attribute.

setAttributeBinding

public final void setAttributeBinding(java.lang.String name,
                                      BoundValue binding)
Sets the binding for this named attribute.

getAttributeValue

public final java.lang.Object getAttributeValue(java.lang.String name)
Returns the value for this named attribute.

getAttributeValue

protected final java.lang.Object getAttributeValue(BajaContext context,
                                                   java.lang.String name)
Returns the value for this named attribute, resolving any binding.

getRenderingContext

protected final RenderingContext getRenderingContext(BajaContext context)
Returns the rendering context to use when resolving bound values.

setAttributeInternal

protected final void setAttributeInternal(java.lang.String name,
                                          java.lang.Object value)
Sets the internal value for this names attribute.

getAttributeInternal

protected final java.lang.Object getAttributeInternal(java.lang.String name)
Returns the internal value for this names attribute.

Oracle UIX API Reference
Release 2.1.22.0.0
B12196-01

Copyright © 2002,2003, Oracle. All Rights Reserved.