org.enhydra.barracuda.core.event.helper
Class BTemplateViewHandler
java.lang.Object
|
+--org.enhydra.barracuda.core.event.DefaultBaseEventListener
|
+--org.enhydra.barracuda.core.event.helper.DefaultViewHandler
|
+--org.enhydra.barracuda.core.event.helper.BTemplateViewHandler
- All Implemented Interfaces:
- BaseEventListener, java.util.EventListener
- public abstract class BTemplateViewHandler
- extends DefaultViewHandler
A custom implementation of the default view handler tailored for
template components. All you have to do is instantiate the class
with the name of the template and a reference to the model; it takes
care of everything else.
Method Summary |
BTemplate |
getBTemplate()
Provide a handle to the underlying BTemplate component |
abstract java.lang.Class |
getTemplateClass()
Return an instance of the template class (must implement Document) |
abstract java.lang.Object |
getTemplateModels()
Return an instance of the template model; you can either return
a single instance of a TemplateModel, -OR- you can return a
List of TemplateModels |
org.w3c.dom.Document |
handleViewEvent(BComponent root,
ViewContext vc)
Generate the view |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
templateComp
protected BTemplate templateComp
BTemplateViewHandler
public BTemplateViewHandler()
getTemplateModels
public abstract java.lang.Object getTemplateModels()
- Return an instance of the template model; you can either return
a single instance of a TemplateModel, -OR- you can return a
List of TemplateModels
getTemplateClass
public abstract java.lang.Class getTemplateClass()
- Return an instance of the template class (must implement Document)
getBTemplate
public BTemplate getBTemplate()
- Provide a handle to the underlying BTemplate component
handleViewEvent
public org.w3c.dom.Document handleViewEvent(BComponent root,
ViewContext vc)
throws EventException,
javax.servlet.ServletException,
java.io.IOException
- Generate the view
- Specified by:
handleViewEvent
in class DefaultViewHandler
- Parameters:
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
- Returns:
- the Document to be rendered
- Throws:
java.io.IOException
javax.servlet.ServletException
EventException
Copyright © 2001 Enhydra.org