|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.enhydra.barracuda.core.event.DefaultBaseEventListener
org.enhydra.barracuda.core.event.helper.DefaultViewHandler
A very simple view handler that provides a default implementation tailored for the use of components. In many ways, this is analagous to the ComponentGateway class--a component hierarchy is created, initialized and rendered automatically for you. All the developer has to do is a) implement the handleViewEvent method to add any custom components to the root component (ie. for rendering) and b) return the master DOM page that needs to be rendered to generate the final view.
Field Summary | |
protected static org.apache.log4j.Logger |
localLogger
|
protected boolean |
recycleChildren
|
protected ViewContext |
vc
|
Fields inherited from class org.enhydra.barracuda.core.event.DefaultBaseEventListener |
idStr |
Constructor Summary | |
DefaultViewHandler()
Public noargs constructor |
Method Summary | |
DOMWriter |
getDOMWriter()
Get a DOMWriter. |
ViewContext |
getViewContext()
Get the view context |
abstract Document |
handleViewEvent(BComponent root)
Handle a view event. |
void |
handleViewEvent(ViewEventContext vec)
Handle the ViewEvent |
void |
postCompRender(BComponent root)
The purpose of this method is to allow for optional post-component-render cycle processing (ie. to remove a value from the user's session). |
void |
preCompRender(BComponent root)
The purpose of this method is to allow for optional pre-component-render cycle processing (ie. to stick a value in the user's session). |
void |
setViewContext(ViewContext ivc)
Set the view context |
Methods inherited from class org.enhydra.barracuda.core.event.DefaultBaseEventListener |
getListenerID, handleControlEvent, handleEvent, handleOtherEvent, isHandled |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static final org.apache.log4j.Logger localLogger
protected boolean recycleChildren
protected ViewContext vc
Constructor Detail |
public DefaultViewHandler()
Method Detail |
public abstract Document handleViewEvent(BComponent root) throws EventException, javax.servlet.ServletException, IOException
Handle a view event. This is the method developers will typically override. The developers shaould add any components to the root component and then return the underlying DOM Document (that backs their components) so it can be rendered
root
- the root component which will get rendered as a result
of this request
javax.servlet.ServletException
IOException
EventException
public void preCompRender(BComponent root)
root
- the root component which will get rendered as a result
of this requestpublic void postCompRender(BComponent root)
root
- the root component which will get rendered as a result
of this requestpublic DOMWriter getDOMWriter()
Get a DOMWriter. By default, we use a DefaultDOMWriter. If you'd like to use something else, override this method.
public void setViewContext(ViewContext ivc)
public ViewContext getViewContext()
public void handleViewEvent(ViewEventContext vec) throws EventException, javax.servlet.ServletException, IOException
handleViewEvent
in class DefaultBaseEventListener
vec
- the ViewEventContext
IOException
EventException
javax.servlet.ServletException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |