|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.formaria.aria.data.DataBinding
org.formaria.aria.data.ListBinding
public class ListBinding
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) Formaria Ltd., 2008
License: see license.txt
| Field Summary | |
|---|---|
protected java.lang.String |
attribStr
|
protected boolean |
bDirty
|
protected ListHolder |
listHolder
|
protected ListModelAdapter |
model
|
protected boolean |
saveToSourceNode
|
protected boolean |
useActiveField
|
protected boolean |
useUnique
|
| Fields inherited from class org.formaria.aria.data.DataBinding |
|---|
component, currentProject, DEFAULT_OUTPUT_PATH, outputModel, outputPath, reevaluate, sourceModel, sourcePath |
| Constructor Summary | |
|---|---|
ListBinding()
null ctor |
|
| Method Summary | |
|---|---|
protected java.lang.Object |
addItem(java.lang.Object obj)
Add an item to the component. |
void |
get()
Updates the TextComponent 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 |
boolean |
getDirty()
Retrieve the dirty flag |
java.lang.String |
getName()
Gets the name of the model node |
java.lang.String |
getType()
Get the type of this binding |
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(DataModel newNode,
java.lang.String outputPath)
Update the path values stored by this node. |
void |
setSource(DataModel newNode)
Set the source for this bindings's data |
void |
setup(Project project,
java.lang.Object c,
java.util.Hashtable bindingConfig,
java.util.Hashtable instanceConfig)
Setup and configure the binding instance. |
void |
setUseUnique(boolean isUnique)
Set the list to use unique entries (remove duplicates) |
| Methods inherited from class org.formaria.aria.data.DataBinding |
|---|
getAttributes, getComponent, getOutput, getOutputPath, getReevaluate, getSource, getSourcePath, setOutputPath, setReevaluate, setSourcePath, setupHelper |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected ListHolder listHolder
protected ListModelAdapter model
protected boolean useUnique
protected boolean useActiveField
protected boolean bDirty
protected boolean saveToSourceNode
protected java.lang.String attribStr
| Constructor Detail |
|---|
public ListBinding()
| Method Detail |
|---|
public void setup(Project project,
java.lang.Object c,
java.util.Hashtable bindingConfig,
java.util.Hashtable instanceConfig)
setup in class DataBindingproject - 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 setDirty(boolean dirty)
dirty - the state for the dirty flagpublic boolean getDirty()
public void get()
get in class DataBindingprotected java.lang.Object addItem(java.lang.Object obj)
obj - The new item to be added to the list
public void set()
set in class DataBindingpublic void setUseUnique(boolean isUnique)
isUnique - the new flag valuepublic java.lang.String getName()
public void setSource(DataModel newNode)
setSource in class DataBindingnewNode - the path to the data in the model
public void setOutput(DataModel newNode,
java.lang.String outputPath)
setOutput in class DataBindingnewNode - the new model for saving the output dataoutputPath - The path to which the outputModel is writing.public java.util.Vector getAttributes(boolean required)
getAttributes in class DataBindingrequired - true to list only the require attribues, false for all attributespublic java.lang.String getType()
getType in class DataBinding
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||