org.enhydra.barracuda.contrib.sam.xmlform
Class XmlFormViewHandler

java.lang.Object
  extended byorg.enhydra.barracuda.core.event.DefaultBaseEventListener
      extended byorg.enhydra.barracuda.core.event.helper.DefaultViewHandler
          extended byorg.enhydra.barracuda.contrib.sam.xmlform.ModifyDomViewHandler
              extended byorg.enhydra.barracuda.contrib.sam.xmlform.XmlFormViewHandler
All Implemented Interfaces:
BaseEventListener, EventListener
Direct Known Subclasses:
DataObjectViewHandler

public abstract class XmlFormViewHandler
extends ModifyDomViewHandler

extends ModifyDomViewHandler in order to automatically creation of a XML Form based view.


Field Summary
protected static org.apache.log4j.Logger logger
           
 
Fields inherited from class org.enhydra.barracuda.contrib.sam.xmlform.ModifyDomViewHandler
templateComp
 
Fields inherited from class org.enhydra.barracuda.core.event.helper.DefaultViewHandler
localLogger, recycleChildren, vc
 
Fields inherited from class org.enhydra.barracuda.core.event.DefaultBaseEventListener
idStr
 
Constructor Summary
XmlFormViewHandler()
           
 
Method Summary
 Object getTemplateModels(ViewContext vc)
          needed because getTemplateModels does not have a context
protected abstract  XmlFormMap getXmlForm(ViewContext vc)
          overwrite in subclasses, must return a XmlFormMap defining the fields of the form
protected  void modifyDOM(Document page, ViewContext vc)
          change the given Document, copy the templates of the various form types as defined in the XmlFormMap
 
Methods inherited from class org.enhydra.barracuda.contrib.sam.xmlform.ModifyDomViewHandler
getBTemplate, getTemplateClass, handleViewEvent
 
Methods inherited from class org.enhydra.barracuda.core.event.helper.DefaultViewHandler
getDOMWriter, getViewContext, handleViewEvent, postCompRender, preCompRender, setViewContext
 
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

logger

protected static org.apache.log4j.Logger logger
Constructor Detail

XmlFormViewHandler

public XmlFormViewHandler()
Method Detail

getXmlForm

protected abstract XmlFormMap getXmlForm(ViewContext vc)
overwrite in subclasses, must return a XmlFormMap defining the fields of the form


getTemplateModels

public Object getTemplateModels(ViewContext vc)
needed because getTemplateModels does not have a context

Specified by:
getTemplateModels in class ModifyDomViewHandler
Parameters:
vc - the ViewContext of the current RenderEvent
Returns:
either a single model or a List of models

modifyDOM

protected void modifyDOM(Document page,
                         ViewContext vc)
change the given Document, copy the templates of the various form types as defined in the XmlFormMap

Overrides:
modifyDOM in class ModifyDomViewHandler
Parameters:
page - a instance of the class returned by ModifyDomViewHandler.getTemplateClass(org.enhydra.barracuda.core.comp.ViewContext)
vc - the context of the current event


Copyright © 2003 BarracudaMVC.org All Rights Reserved.