org.formaria.data
Class LocalisedListBinding
java.lang.Object
org.formaria.aria.data.DataBinding
org.formaria.aria.data.ListBinding
org.formaria.data.LocalisedListBinding
public class LocalisedListBinding
- extends ListBinding
A list binding that supports localization of the list content
Copyright Formaria (c) 2008
$Revision: 2.8 $
License: see license.txt
|
Method Summary |
protected java.lang.String |
addItem(java.lang.String s)
translate the text at this point |
java.lang.String |
getKey(int idx)
Get the untranslated key for a list item |
void |
setup(Project project,
java.lang.Object c,
java.util.Hashtable bindingConfig,
java.util.Hashtable instanceConfig)
Setup and configure the binding instance. |
protected java.lang.String |
translate(java.lang.String key)
Translate the text being added to the list. |
| Methods inherited from class org.formaria.aria.data.ListBinding |
addItem, get, getAttributes, getDirty, getName, getType, set, setDirty, setOutput, setSource, setUseUnique |
| 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 |
languageResourceBundle
protected java.util.ResourceBundle languageResourceBundle
keys
protected java.util.Vector keys
LocalisedListBinding
public LocalisedListBinding()
setup
public void setup(Project project,
java.lang.Object c,
java.util.Hashtable bindingConfig,
java.util.Hashtable instanceConfig)
- Setup and configure the binding instance. The binding is configured via the
XML setup registered for the particular binding type and then, subsequently
by attibitional attributes of the binding instance specified in the page
declaration, for the individual binding instance. The binding may also
obtain configuration or reference information from the component and the
project.
- Overrides:
setup in class ListBinding
- Parameters:
project - 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 instance
translate
protected java.lang.String translate(java.lang.String key)
- Translate the text being added to the list.
- Parameters:
key - the key to be look up in the resourcebundle
- Returns:
- the translated key or the key itself if no translation found
addItem
protected java.lang.String addItem(java.lang.String s)
- translate the text at this point
- Parameters:
s - the text to be translated
- Returns:
- The passed String
getKey
public java.lang.String getKey(int idx)
- Get the untranslated key for a list item
- Parameters:
idx - the list index
- Returns:
- the key at the specified index