|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.xoetrope.xui.data.XDataBinding
net.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 java.lang.String |
keyColumnName
|
protected XTableModelAdapter |
modelAdapter
|
protected XListHolder |
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 | |
|---|---|
XListTableBinding()
Construct a new data binding |
|
| Method Summary | |
|---|---|
void |
get()
Update the bound component with the value obtained from the data model. |
java.util.Vector |
getAttributes(boolean required)
Get the names of the attributes used by this binding class |
java.lang.String |
getType()
Get the type of this binding |
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 |
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, 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 |
|---|
protected XTableModelAdapter modelAdapter
protected XListHolder target
protected boolean useUnique
protected int displayColumnIdx
protected int keyColumnIdx
protected java.lang.String keyColumnName
| Constructor Detail |
|---|
public XListTableBinding()
| Method Detail |
|---|
public void setup(XProject project,
java.lang.Object c,
java.util.Hashtable bindingConfig,
java.util.Hashtable instanceConfig)
setup in class XDataBindingproject - the owning projectc - the component being boundbindingConfig - the XML element which contains the binding configurationinstanceConfig - the XML element which contains the setup attributes of the binding instancepublic void get()
get in class XDataBindingpublic void set()
set in class XDataBindingpublic void setSourcePath(java.lang.String newPath)
setSourcePath in class XDataBindingnewPath - The path to which the source model is to be boundpublic void setOutputPath(java.lang.String newPath)
setOutputPath in class XDataBindingnewPath - The path to which the output model is to be boundpublic void setSource(XModel newNode)
setSource in class XDataBindingnewNode - the new model for the data sourcepublic 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)public java.util.Vector getAttributes(boolean required)
getAttributes in class XDataBindingrequired - true to list only the require attribues, false for all attributespublic java.lang.String getType()
getType in class XDataBinding
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||