|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.xoetrope.optional.data.XListTableBinding
public class XListTableBinding
A data binding for list components, including drop down lists. This binding allows a key field to be chosen so that records may be chosen using a key (or ID) value. A display field can also be specified so that the list need not display the first field from the table.
Copyright Xoetrope (c) 2001-2004
$Revision: 2.5 $ License: see license.txt
| Field Summary | |
|---|---|
protected int |
displayColumnIdx
|
protected int |
keyColumnIdx
|
protected DatabaseTableModelAdapter |
modelAdapter
|
protected XModel |
outputNode
|
protected java.lang.String |
outputPath
|
protected java.lang.String |
sourcePath
|
protected XListHolder |
target
|
protected boolean |
useUnique
|
| Fields inherited from interface net.xoetrope.xui.data.XDataBinding |
|---|
DEFAULT_OUTPUT_PATH |
| Constructor Summary | |
|---|---|
XListTableBinding(java.lang.Object c,
DatabaseTableModelAdapter node)
Construct a new data binding |
|
XListTableBinding(java.lang.Object comp,
XModel xmodel)
Construct a new data binding |
|
| Method Summary | |
|---|---|
void |
get()
Update the bound component with the value obtained from the data model. |
java.lang.Object |
getComponent()
Get the component to which this binding is attached |
java.lang.String |
getOutputPath()
Get the model path for the output/state data |
java.lang.String |
getSourcePath()
Get the model path for the source data |
void |
set()
Update the data model with the value retrieved from the bound component. |
void |
setDisplayColumn(java.lang.String displayColumn)
Set the display column index, by default it is set to zero or the first column |
void |
setKeyColumn(java.lang.String keyColumn)
Set the key column index, by default it is set to zero or the first column |
void |
setOutput(XModel newNode,
java.lang.String outputPath)
Update the path values stored by this node. |
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 |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected DatabaseTableModelAdapter modelAdapter
protected XListHolder target
protected XModel outputNode
protected java.lang.String outputPath
protected java.lang.String sourcePath
protected boolean useUnique
protected int displayColumnIdx
protected int keyColumnIdx
| Constructor Detail |
|---|
public XListTableBinding(java.lang.Object comp,
XModel xmodel)
comp - the component to be boundxmodel - the model node that is to act as the data source
public XListTableBinding(java.lang.Object c,
DatabaseTableModelAdapter node)
c - the component to be boundnode - the model node| Method Detail |
|---|
public void get()
get in interface XDataBindingpublic void set()
set in interface XDataBindingpublic java.lang.Object getComponent()
getComponent in interface XDataBindingpublic java.lang.String getSourcePath()
getSourcePath in interface XDataBindingpublic java.lang.String getOutputPath()
getOutputPath in interface XDataBindingpublic void setSourcePath(java.lang.String newPath)
setSourcePath in interface XDataBindingnewPath - The path to which the source model is to be boundpublic void setOutputPath(java.lang.String newPath)
setOutputPath in interface XDataBindingnewPath - The path to which the output model is to be boundpublic void setSource(XModel newNode)
setSource in interface XDataBindingnewNode - the new model for the data source
public void setOutput(XModel newNode,
java.lang.String outputPath)
setOutput in interface XDataBindingnewNode - the new model for saving the output dataoutputPath - The path to which the outputModel is writing.public void setDisplayColumn(java.lang.String displayColumn)
displayColumn - the column index (zero based)public void setKeyColumn(java.lang.String keyColumn)
keyColumn - the column index (zero based)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||