org.apache.cocoon.forms.binding
Class InsertNodeJXPathBinding

java.lang.Object
  extended byorg.apache.cocoon.util.AbstractLogEnabled
      extended byorg.apache.cocoon.forms.binding.JXPathBindingBase
          extended byorg.apache.cocoon.forms.binding.InsertNodeJXPathBinding
All Implemented Interfaces:
Binding

public class InsertNodeJXPathBinding
extends JXPathBindingBase

InsertNodeJXPathBinding provides an implementation of a Binding that inserts a clone of some 'template document-fragment' into the target back-end model upon save.

NOTES:

  1. This Binding does not perform any actions when loading.
  2. This expects the back-end model to be an XML file.

Version:
$Id: InsertNodeJXPathBinding.html 1304280 2012-03-23 11:18:01Z ilgrosso $

Field Summary
 
Fields inherited from class org.apache.cocoon.forms.binding.JXPathBindingBase
classes, parent
 
Constructor Summary
InsertNodeJXPathBinding(JXPathBindingBuilderBase.CommonAttributes commonAtts, DocumentFragment domTemplate)
          Constructs InsertNodeJXPathBinding
 
Method Summary
 void doLoad(Widget frmModel, org.apache.commons.jxpath.JXPathContext jxpc)
          Do-nothing implementation of the interface.
 void doSave(Widget frmModel, org.apache.commons.jxpath.JXPathContext jxpc)
          Registers a JXPath Factory on the JXPath Context.
 DocumentFragment getTemplate()
           
 String toString()
           
 
Methods inherited from class org.apache.cocoon.forms.binding.JXPathBindingBase
getClass, getCommonAtts, getEnclosingLibrary, getId, getLocation, isValid, loadFormFromModel, loadFormFromModel, saveFormToModel, saveFormToModel, selectWidget, setEnclosingLibrary, setParent
 
Methods inherited from class org.apache.cocoon.util.AbstractLogEnabled
getLogger, setLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

InsertNodeJXPathBinding

public InsertNodeJXPathBinding(JXPathBindingBuilderBase.CommonAttributes commonAtts,
                               DocumentFragment domTemplate)
Constructs InsertNodeJXPathBinding

Method Detail

getTemplate

public DocumentFragment getTemplate()

doLoad

public void doLoad(Widget frmModel,
                   org.apache.commons.jxpath.JXPathContext jxpc)
Do-nothing implementation of the interface.

Specified by:
doLoad in class JXPathBindingBase

doSave

public void doSave(Widget frmModel,
                   org.apache.commons.jxpath.JXPathContext jxpc)
Registers a JXPath Factory on the JXPath Context.

The factory will inserts a clone of the 'template' DocumentFragment inside this object into the target objectmodel.

Specified by:
doSave in class JXPathBindingBase

toString

public String toString()


Copyright 1999-2008 The Apache Software Foundation. All Rights Reserved.