| java.lang.Object net.xoetrope.xui.data.XListBinding
All known Subclasses: net.xoetrope.optional.data.XLocalisedListBinding,
XListBinding | public class XListBinding implements XDataBinding(Code) | | 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
version: $Revision: 1.29 $ |
Constructor Summary | |
public | XListBinding() | public | XListBinding(Component c, String dataElement) | public | XListBinding(Component c, String dataElement, XModel srcModel) | public | XListBinding(Component c, String dataElement, String destElement) | public | XListBinding(Component c, String dataElement, String destElement, XModel srcModel, XModel dstModel) | public | XListBinding(Component c, String dataElement, String destElement, XModel srcModel, XModel dstModel, boolean saveToSource) | public | XListBinding(Component c, XModel node) | public | XListBinding(Component c, XModelAdapter node) |
bDirty | protected boolean bDirty(Code) | | |
saveToSourceNode | protected boolean saveToSourceNode(Code) | | |
useUnique | protected boolean useUnique(Code) | | |
XListBinding | public XListBinding()(Code) | | |
XListBinding | public XListBinding(Component c, String dataElement)(Code) | | Construct a new data binding
Parameters: c - the component to be bound Parameters: dataElement - the name of the data in the model |
XListBinding | public XListBinding(Component c, String dataElement, XModel srcModel)(Code) | | Construct a new data binding
Parameters: c - the component to be bound Parameters: dataElement - the name of the data in the model Parameters: srcModel - the model node that acts as the data source for this node |
XListBinding | public XListBinding(Component c, String dataElement, String destElement)(Code) | | Construct a new data binding
Parameters: c - the component to be bound Parameters: dataElement - the name of the data in the model Parameters: destElement - the name of the destination data in the model |
XListBinding | public XListBinding(Component c, String dataElement, String destElement, XModel srcModel, XModel dstModel)(Code) | | Construct a new data binding
Parameters: c - the component to be bound Parameters: dataElement - the name of the data in the model Parameters: destElement - the name of the destination data in the model Parameters: srcModel - the model node that acts as the data source for this node Parameters: dstModel - the model node to which the selection is saved |
XListBinding | public XListBinding(Component c, String dataElement, String destElement, XModel srcModel, XModel dstModel, boolean saveToSource)(Code) | | Construct a new data binding
Set the languageResourceBundle for text to be translated
Parameters: c - the component to be bound Parameters: dataElement - the name of the data in the model Parameters: destElement - the name of the destination data in the model Parameters: srcModel - the model node that acts as the data source for this node Parameters: dstModel - the model node to which the selection is saved Parameters: saveToSource - true to save the selected value as the value of the source node, false to save only to the output node |
XListBinding | public XListBinding(Component c, XModel node)(Code) | | Construct a new data binding
Parameters: c - the component to be bound Parameters: node - the model node |
XListBinding | public XListBinding(Component c, XModelAdapter node)(Code) | | Construct a new data binding
Parameters: c - the component to be bound Parameters: node - the model node |
addItem | protected String addItem(String s)(Code) | | Add an item to the component. In a separate method to aid with subclassing
for localisation
Parameters: s - |
get | public void get()(Code) | | Updates the TextComponent with the value obtained from the data model.
Filters the list by ignoring repeat items (note that this does not
guarantee unique list entries unless the useUnique flag is set).
|
getComponent | public Component getComponent()(Code) | | Gets the component on which this binding operates
the bound component |
getName | public String getName()(Code) | | Gets the name of the model node
the name |
getOutputPath | public String getOutputPath()(Code) | | Get the model component to which this object binds
|
getSourcePath | public String getSourcePath()(Code) | | Get the model component to which this object binds
|
set | public void set()(Code) | | Updates the data model with the value retrieved from the TextComponent.
|
setOutput | public void setOutput(XModel newNode)(Code) | | Set the output node where state data for this binding will be saved
Parameters: newPath - the path of the output/state node |
setOutputPath | public void setOutputPath(String newPath)(Code) | | Set the model path for the output/state data
|
setSource | public void setSource(XModel newNode)(Code) | | Set the source for this bindings's data
Parameters: newNode - the path to the data in the model |
setSourcePath | public void setSourcePath(String newPath)(Code) | | Set the model path for the source data
|
setUseUnique | public void setUseUnique(boolean isUnique)(Code) | | Set the list to use unique entries (remove duplicates)
Parameters: isUnique - teh new flag value |
|
|