|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.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 int |
maxAge
|
protected boolean |
preventCaching
|
protected boolean |
printPretty
|
protected boolean |
recycleChildren
|
Fields inherited from class org.enhydra.barracuda.core.event.DefaultBaseEventListener |
idStr |
Constructor Summary | |
DefaultViewHandler()
Public noargs constructor |
Method Summary | |
DOMWriter |
getDOMWriter()
Get a DOMWriter. |
abstract org.w3c.dom.Document |
handleViewEvent(BComponent root,
ViewContext vc)
Handle a view event. |
void |
handleViewEvent(ViewEventContext vec)
Handle the ViewEvent |
void |
postCompRender(BComponent root,
ViewContext vc)
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,
ViewContext vc)
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) |
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 org.apache.log4j.Logger localLogger
protected boolean printPretty
protected boolean preventCaching
protected int maxAge
protected boolean recycleChildren
Constructor Detail |
public DefaultViewHandler()
Method Detail |
public abstract org.w3c.dom.Document handleViewEvent(BComponent root, ViewContext vc) throws EventException, javax.servlet.ServletException, java.io.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 requestvc
- the ViewContext object describes what features the
client view is capable of supporting
javax.servlet.ServletException
java.io.IOException
EventException
public void preCompRender(BComponent root, ViewContext vc)
root
- the root component which will get rendered as a result
of this requestvc
- the ViewContext object describes what features the
client view is capable of supportingpublic void postCompRender(BComponent root, ViewContext vc)
root
- the root component which will get rendered as a result
of this requestvc
- the ViewContext object describes what features the
client view is capable of supportingpublic DOMWriter getDOMWriter()
Get a DOMWriter. By default, we use a DefaultDOMWriter. If you'd like to use something else, override this method.
public void handleViewEvent(ViewEventContext vec) throws EventException, javax.servlet.ServletException, java.io.IOException
handleViewEvent
in class DefaultBaseEventListener
vec
- the ViewEventContext
java.io.IOException
javax.servlet.ServletException
EventException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |