net.xoetrope.optional.data
Class XTableTableBinding

java.lang.Object
  extended by net.xoetrope.xui.data.XDataBinding
      extended by net.xoetrope.optional.data.XTableTableBinding

public class XTableTableBinding
extends XDataBinding

A binding that binds a table component to a database table. Normally this object should be setup by the XOptionalBindingFactory

Copyright Xoetrope(c) 2003-2004

$Revision: 2.8 $ License: see license.txt


Field Summary
protected  XModelHolder target
           
protected  boolean useUnique
           
 
Fields inherited from class net.xoetrope.xui.data.XDataBinding
component, currentProject, DEFAULT_OUTPUT_PATH, outputModel, outputPath, reevaluate, sourceModel, sourcePath
 
Constructor Summary
XTableTableBinding()
          An XTable binding ctor
 
Method Summary
 void get()
          Updates the table component with the value obtained from the data model.
 java.lang.String getType()
          Get the type of this binding
 void set()
          Updates the data model with the value retrieved from the table component.
 void setOutputPath(java.lang.String newPath)
          Set the model path for the output/state data
 void setSource(XModel newNode)
          Update the model node used in the binding.
 void setSourcePath(java.lang.String newPath)
          Set the model path for the source data
 void setup(XProject project, java.lang.Object c, java.util.Hashtable bindingConfig, java.util.Hashtable instanceConfig)
          Setup and configure the binding instance.
 
Methods inherited from class net.xoetrope.xui.data.XDataBinding
getAttributes, getAttributes, getComponent, getOutput, getOutputPath, getReevaluate, getSource, getSourcePath, setOutput, setReevaluate, setupHelper
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

target

protected XModelHolder target

useUnique

protected boolean useUnique
Constructor Detail

XTableTableBinding

public XTableTableBinding()
An XTable binding ctor

Method Detail

setup

public void setup(XProject project,
                  java.lang.Object c,
                  java.util.Hashtable bindingConfig,
                  java.util.Hashtable instanceConfig)
Setup and configure the binding instance. The binding is configured via the XML setup registered for the particular binding type and then, subsequently by attibitional attributes of the binding instance specified in the page declaration, for the individual binding instance. The binding may also obtain configuration or reference information from the component and the project.

Specified by:
setup in class XDataBinding
Parameters:
project - the owning project
c - the component being bound
bindingConfig - the XML element which contains the binding configuration
instanceConfig - the XML element which contains the setup attributes of the binding instance

get

public void get()
Updates the table component with the value obtained from the data model. This method does nothing as the table should dynamically pull its data from the model. Any change in the model is effected by the setSore or setSourcePath methods.

Specified by:
get in class XDataBinding

set

public void set()
Updates the data model with the value retrieved from the table component.

Specified by:
set in class XDataBinding

setSourcePath

public void setSourcePath(java.lang.String newPath)
Set the model path for the source data

Overrides:
setSourcePath in class XDataBinding
Parameters:
newPath - The path to which the source model is to be bound

setOutputPath

public void setOutputPath(java.lang.String newPath)
Set the model path for the output/state data

Overrides:
setOutputPath in class XDataBinding
Parameters:
newPath - The path to which the output model is to be bound

setSource

public void setSource(XModel newNode)
Update the model node used in the binding. Note that this method does not modify the path values stored by this node.

Overrides:
setSource in class XDataBinding
Parameters:
newNode - the new model for the data source

getType

public java.lang.String getType()
Get the type of this binding

Specified by:
getType in class XDataBinding
Returns:
the binding type name