org.barracudamvc.contrib.sam.xmlform
Class ModifyDomViewHandler
java.lang.Object
org.barracudamvc.core.event.DefaultBaseEventListener
org.barracudamvc.core.event.helper.DefaultViewHandler
org.barracudamvc.contrib.sam.xmlform.ModifyDomViewHandler
- All Implemented Interfaces:
- EventListener, BaseEventListener
- Direct Known Subclasses:
- XmlFormViewHandler
public abstract class ModifyDomViewHandler
- extends DefaultViewHandler
Pretty similar class to BTemplateViewHandler
. The main differences are
- Version:
- $Id: ModifyDomViewHandler.java 114 2005-12-09 15:51:51Z christianc $
- Author:
- Stefan Armbruster
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
protected static org.apache.log4j.Logger logger
templateComp
protected BTemplate templateComp
ModifyDomViewHandler
public ModifyDomViewHandler()
getTemplateModels
public abstract Object getTemplateModels(ViewContext vc)
throws EventException,
javax.servlet.ServletException,
IOException
- abstract method for getting als required models
- Parameters:
vc
- the ViewContext of the current RenderEvent
- Returns:
- either a single model or a
List
of models
- Throws:
EventException
javax.servlet.ServletException
IOException
getTemplateClass
public abstract Class getTemplateClass(ViewContext vc)
throws EventException,
javax.servlet.ServletException,
IOException
- Return an instance of the template class (must implement Document)
- Throws:
EventException
javax.servlet.ServletException
IOException
getBTemplate
public BTemplate getBTemplate()
- Provide a handle to the underlying BTemplate component
modifyDOM
protected void modifyDOM(Document page,
ViewContext vc)
throws EventException,
javax.servlet.ServletException,
IOException
- Placeholder for DOM-modifications prior to directive mappings. The default
implementation is empty.
- Parameters:
page
- a instance of the class returned by getTemplateClass(org.barracudamvc.core.comp.ViewContext)
vc
- the context of the current event
- Throws:
EventException
javax.servlet.ServletException
IOException
handleViewEvent
public Document handleViewEvent(BComponent root)
throws EventException,
javax.servlet.ServletException,
IOException
- Generate the view
- Specified by:
handleViewEvent
in class DefaultViewHandler
- Parameters:
root
- the root component which will get rendered as a result
of this request
- Returns:
- the Document to be rendered
- Throws:
javax.servlet.ServletException
IOException
EventException
Copyright © 2006 BarracudaMVC.org All Rights Reserved.