org.apache.cocoon.forms.binding
Interface Binding

All Known Implementing Classes:
AbstractCustomBinding, JXPathBindingBase

public interface Binding

Binding declares the methods to 'bind' (i.e. 'load' and 'save') information elements from some back-end model (2nd argument) to and from a existing Cocoon Form Widget.

Version:
$Id: Binding.java 289538 2005-09-16 13:46:22Z sylvain $

Method Summary
 Binding getClass(String id)
          Gets a binding class.
 String getId()
          Gets binding definition id.
 Library getLocalLibrary()
          returns the local library for this tree of bindings
 boolean isValid()
          checks for deep validity of this binding tree (taking into accound included libraries)
 void loadFormFromModel(Widget frmModel, Object objModel)
          Loads the information-elements from the objModel to the frmModel.
 void saveFormToModel(Widget frmModel, Object objModel)
          Saves the infortmation-elements to the objModel from the frmModel.
 void setParent(Binding binding)
          Sets parent binding.
 

Method Detail

setParent

public void setParent(Binding binding)
Sets parent binding.

Parameters:
binding - Parent of this binding.

getId

public String getId()
Gets binding definition id.


getLocalLibrary

public Library getLocalLibrary()
returns the local library for this tree of bindings


isValid

public boolean isValid()
checks for deep validity of this binding tree (taking into accound included libraries)


getClass

public Binding getClass(String id)
Gets a binding class.

Parameters:
id - Id of binding class to get.

loadFormFromModel

public void loadFormFromModel(Widget frmModel,
                              Object objModel)
                       throws BindingException
Loads the information-elements from the objModel to the frmModel.

Parameters:
frmModel -
objModel -
Throws:
BindingException

saveFormToModel

public void saveFormToModel(Widget frmModel,
                            Object objModel)
                     throws BindingException
Saves the infortmation-elements to the objModel from the frmModel.

Parameters:
frmModel -
objModel -
Throws:
BindingException


Copyright ? 1999-2005 The Apache Software Foundation. All Rights Reserved.