|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.xoetrope.xui.data.XListBinding
public class XListBinding
Bind a list to a data model value/node. The binding allows a list model node to
linked to a UI component so that it can be refreshed when new data is written
to the model or conversely when the UI component needs to write data to the
model.
This binding is designed to be used by list like components such
as comboboxes or drop down lists.
Copyright: Copyright (c) Xoetrope Ltd., 1998-2003
License: see license.txt
| Field Summary | |
|---|---|
protected java.lang.String |
attribStr
|
protected boolean |
bDirty
|
protected XListHolder |
comp
|
protected XListModelAdapter |
model
|
protected XModel |
outputNode
|
protected java.lang.String |
outputPath
|
protected boolean |
saveToSourceNode
|
protected java.lang.String |
srcPath
|
protected boolean |
useUnique
|
| Fields inherited from interface net.xoetrope.xui.data.XDataBinding |
|---|
DEFAULT_OUTPUT_PATH |
| Constructor Summary | |
|---|---|
XListBinding()
null ctor |
|
XListBinding(java.lang.Object c,
java.lang.String dataElement)
Construct a new data binding |
|
XListBinding(java.lang.Object c,
java.lang.String dataElement,
java.lang.String destElement)
Construct a new data binding |
|
XListBinding(java.lang.Object c,
java.lang.String dataElement,
java.lang.String destElement,
XModel srcModel,
XModel dstModel)
Construct a new data binding |
|
XListBinding(java.lang.Object c,
java.lang.String dataElement,
java.lang.String destElement,
XModel srcModel,
XModel dstModel,
java.lang.String attrib,
boolean saveToSource)
Construct a new data binding Set the languageResourceBundle for text to be translated |
|
XListBinding(java.lang.Object c,
java.lang.String dataElement,
XModel srcModel)
Construct a new data binding |
|
XListBinding(java.lang.Object c,
XModel node)
Construct a new data binding |
|
XListBinding(java.lang.Object c,
XModelAdapter node)
Construct a new data binding |
|
| Method Summary | |
|---|---|
protected java.lang.String |
addItem(java.lang.String s)
Add an item to the component. |
void |
get()
Updates the TextComponent with the value obtained from the data model. |
java.lang.Object |
getComponent()
Gets the component on which this binding operates |
boolean |
getDirty()
Retrieve the dirty flag |
java.lang.String |
getName()
Gets the name of the model node |
java.lang.String |
getOutputPath()
Get the path to the model which is used for binding |
java.lang.String |
getSourcePath()
Get the path to which the source model is bound |
void |
set()
Updates the data model with the value retrieved from the TextComponent. |
void |
setDirty(boolean dirty)
Set the dirty flag so that the list repopulates |
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)
Set the source for this bindings's data |
void |
setSourcePath(java.lang.String newPath)
Set the model path for the source data |
void |
setUseUnique(boolean isUnique)
Set the list to use unique entries (remove duplicates) |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected XListHolder comp
protected XListModelAdapter model
protected XModel outputNode
protected boolean useUnique
protected boolean bDirty
protected boolean saveToSourceNode
protected java.lang.String srcPath
protected java.lang.String outputPath
protected java.lang.String attribStr
| Constructor Detail |
|---|
public XListBinding()
public XListBinding(java.lang.Object c,
java.lang.String dataElement)
c - the component to be bounddataElement - the name of the data in the model
public XListBinding(java.lang.Object c,
java.lang.String dataElement,
XModel srcModel)
c - the component to be bounddataElement - the name of the data in the modelsrcModel - the model node that acts as the data source for this node
public XListBinding(java.lang.Object c,
java.lang.String dataElement,
java.lang.String destElement)
c - the component to be bounddataElement - the name of the data in the modeldestElement - the name of the destination data in the model
public XListBinding(java.lang.Object c,
java.lang.String dataElement,
java.lang.String destElement,
XModel srcModel,
XModel dstModel)
c - the component to be bounddataElement - the name of the data in the modeldestElement - the name of the destination data in the modelsrcModel - the model node that acts as the data source for this nodedstModel - the model node to which the selection is saved
public XListBinding(java.lang.Object c,
java.lang.String dataElement,
java.lang.String destElement,
XModel srcModel,
XModel dstModel,
java.lang.String attrib,
boolean saveToSource)
c - the component to be bounddataElement - the name of the data in the modeldestElement - the name of the destination data in the modelsrcModel - the model node that acts as the data source for this nodedstModel - the model node to which the selection is savedattrib - the attribute of the model node to which the selection is savedsaveToSource - true to save the selected value as the value of the source node, false to save only to the output node
public XListBinding(java.lang.Object c,
XModel node)
c - the component to be boundnode - the model node
public XListBinding(java.lang.Object c,
XModelAdapter node)
c - the component to be boundnode - the model node| Method Detail |
|---|
public void setDirty(boolean dirty)
dirty - the state for the dirty flagpublic boolean getDirty()
public void get()
get in interface XDataBindingprotected java.lang.String addItem(java.lang.String s)
s - The new item to be added to the list
public void set()
set in interface XDataBindingpublic void setUseUnique(boolean isUnique)
isUnique - teh new flag valuepublic java.lang.Object getComponent()
getComponent in interface XDataBindingpublic java.lang.String getName()
public java.lang.String getSourcePath()
getSourcePath in interface XDataBindingpublic void setSourcePath(java.lang.String newPath)
setSourcePath in interface XDataBindingnewPath - The path which is to be used by the source modelpublic void setOutputPath(java.lang.String newPath)
setOutputPath in interface XDataBindingnewPath - The path which is to be used by the output modelpublic java.lang.String getOutputPath()
getOutputPath in interface XDataBindingpublic void setSource(XModel newNode)
setSource in interface XDataBindingnewNode - the path to the data in the model
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.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||