net.xoetrope.optional.data
Class XLocalisedListBinding
java.lang.Object
net.xoetrope.xui.data.XDataBinding
net.xoetrope.xui.data.XListBinding
net.xoetrope.optional.data.XLocalisedListBinding
public class XLocalisedListBinding
- extends XListBinding
A list binding that supports localization of the list content
Copyright Xoetrope (c) 2001-2004
$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(XProject 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 net.xoetrope.xui.data.XDataBinding |
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
XLocalisedListBinding
public XLocalisedListBinding()
setup
public void setup(XProject 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 XListBinding
- 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
- Overrides:
addItem
in class XListBinding
- 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