Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.cocoon.forms.binding
Class TempRepeaterJXPathBinding

    java.lang.Object
      org.apache.cocoon.util.AbstractLogEnabled
          org.apache.cocoon.forms.binding.JXPathBindingBase
              org.apache.cocoon.forms.binding.TempRepeaterJXPathBinding

All Implemented Interfaces:
  Binding

public class TempRepeaterJXPathBinding
extends JXPathBindingBase

Experimental simple binding for repeaters: on save, first deletes the target data before recreating it from scratch. Based on code from SimpleRepeater.

For a smarter binding that avoids deletion and recreation, consider `RepeaterJXPathBinding`

Version:
  $Id: TempRepeaterJXPathBinding.java 640682 2008-03-25 03:23:17Z vgritsenko $

Field Summary

Fields inherited from class org.apache.cocoon.forms.binding.JXPathBindingBase
`classes, parent`

Constructor Summary
`TempRepeaterJXPathBinding(JXPathBindingBuilderBase.CommonAttributes commonAtts, String repeaterId, String repeaterPath, String rowPath, String rowPathInsert, boolean virtualRows, boolean clearOnLoad, boolean deleteIfEmpty, JXPathBindingBase rowBinding, JXPathBindingBase insertBinding)`

Method Summary
`void` | `doLoad(Widget frmModel, org.apache.commons.jxpath.JXPathContext jctx)` Performs the actual load binding regardless of the configured value of the "direction" attribute.
`void` | `doSave(Widget frmModel, org.apache.commons.jxpath.JXPathContext jctx)` Performs the actual save binding regardless of the configured value of the "direction" attribute.
`JXPathBindingBase[]` | `getChildBindings()`
`boolean` | `getClearOnLoad()`
`boolean` | `getDeleteIfEmpty()`
`String` | `getId()` Returns binding definition id.
`JXPathBindingBase[]` | `getInsertChildBindings()`
`String` | `getRepeaterPath()`
`String` | `getRowPath()`
`String` | `getRowPathInsert()`
`boolean` | `getVirtualRows()`
`String` | `toString()`

Methods inherited from class org.apache.cocoon.forms.binding.JXPathBindingBase
`getClass, getCommonAtts, getEnclosingLibrary, 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

### TempRepeaterJXPathBinding

    public TempRepeaterJXPathBinding(JXPathBindingBuilderBase.CommonAttributes commonAtts,
                                     String repeaterId,
                                     String repeaterPath,
                                     String rowPath,
                                     String rowPathInsert,
                                     boolean virtualRows,
                                     boolean clearOnLoad,
                                     boolean deleteIfEmpty,
                                     JXPathBindingBase rowBinding,
                                     JXPathBindingBase insertBinding)

Method Detail

### getId

    public String getId()

  Description copied from class: `JXPathBindingBase`
  Returns binding definition id.

  Specified by:
    `getId` in interface `Binding`
  Overrides:
    `getId` in class `JXPathBindingBase`

### getRepeaterPath

    public String getRepeaterPath()

### getRowPath

    public String getRowPath()

### getRowPathInsert

    public String getRowPathInsert()

### getVirtualRows

    public boolean getVirtualRows()

### getClearOnLoad

    public boolean getClearOnLoad()

### getDeleteIfEmpty

    public boolean getDeleteIfEmpty()

### getChildBindings

    public JXPathBindingBase[] getChildBindings()

### getInsertChildBindings

    public JXPathBindingBase[] getInsertChildBindings()

### doLoad

    public void doLoad(Widget frmModel,
                       org.apache.commons.jxpath.JXPathContext jctx)
                throws BindingException

  Description copied from class: `JXPathBindingBase`
  Performs the actual load binding regardless of the configured value of the "direction" attribute. Abstract method that subclasses need to implement for specific activity.

  Specified by:
    `doLoad` in class `JXPathBindingBase`
  Throws:
    `BindingException`

### doSave

    public void doSave(Widget frmModel,
                       org.apache.commons.jxpath.JXPathContext jctx)
                throws BindingException

  Description copied from class: `JXPathBindingBase`
  Performs the actual save binding regardless of the configured value of the "direction" attribute. Abstract method that subclasses need to implement for specific activity.

  Specified by:
    `doSave` in class `JXPathBindingBase`
  Throws:
    `BindingException`

### toString

    public String toString()

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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