|
SAP NetWeaver 2004S SPS 10 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sapportals.htmlb.JCOListModel
An implementation of a IListModel for DropdownListBox or Listbox that uses an underlying JCO.Table
Copyright 2004 SAP AG
| Constructor Summary | |
JCOListModel(JCO.Table table)
|
|
| Method Summary | |
void |
addItem(String key,
String text)
adds an item to the list of choices. |
void |
addSelection(String selection)
adds the item with the given key to the selection. |
String |
getKeyByIndex(int index)
gets the key of an item for a specified index. |
Iterator |
getKeys()
gets an Iterator for all keys currently in the list |
String[] |
getMultiSelection()
gets the keys of the currently selected items if the model is a multi selection model. |
String |
getNameOfKeyColumn()
gets the name of the column containing the key values if the list model is associated with a table. |
String |
getNameOfTextColumn()
gets the name of the column containing the visible texts if the list model is associated with a table. |
String |
getSingleSelection()
gets the key of the currently selected item if the model is a single selection model. |
String |
getTextByIndex(int index)
gets the visible text of an item for a specified index. |
String |
getTextForKey(String key)
gets the text associated with the key |
boolean |
isSelected(int index)
determines if the item at the given index is currently selected. |
boolean |
isSelected(String key)
determines if the item with the given key is currently selected. |
boolean |
isSingleSelection()
determines if the model is a single selection model, i.e. allows only a single item to be selected at any given time. |
void |
removeItem(String key)
|
void |
removeSelection(String selection)
adds the item with the given key to the selection. |
void |
setNameOfKeyColumn(String nameOfKeyColumn)
sets the name of the column containing the key values if the list model is associated with a table. |
void |
setNameOfTextColumn(String nameOfValueColumn)
sets the name of the column containing the visible texts if the list model is associated with a table. |
void |
setSelection(String selection)
sets the current selection to the item with the given key. |
void |
setSingleSelection(boolean isSingleSelection)
sets the selection behaviour for the list model |
int |
size()
gets the size of the list, i.e. the number of items. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public JCOListModel(JCO.Table table)
| Method Detail |
public void addItem(String key,
String text)
IListModel
addItem in interface IListModelkey - the key of the itemtext - the visible text of the itempublic int size()
IListModel
size in interface IListModelpublic String getKeyByIndex(int index)
IListModel
getKeyByIndex in interface IListModelindex - the index of the item in the list
public String getTextByIndex(int index)
IListModel
getTextByIndex in interface IListModelindex - the index of the item in the list
public Iterator getKeys()
IListModel
getKeys in interface IListModelpublic String getTextForKey(String key)
IListModel
getTextForKey in interface IListModelkey - the key of an item
public boolean isSelected(int index)
IListModel
isSelected in interface IListModelindex - the index of the item
IListModel.isSelected(String)public boolean isSelected(String key)
IListModel
isSelected in interface IListModelkey - the key of the item
public String getNameOfKeyColumn()
IListModel
getNameOfKeyColumn in interface IListModelpublic void setNameOfKeyColumn(String nameOfKeyColumn)
IListModel
setNameOfKeyColumn in interface IListModelnameOfKeyColumn - the column identifier of the key columnpublic String getNameOfTextColumn()
IListModel
getNameOfTextColumn in interface IListModelpublic void setNameOfTextColumn(String nameOfValueColumn)
IListModel
setNameOfTextColumn in interface IListModelnameOfValueColumn - the column identifier of the text columnpublic void setSelection(String selection)
IListModel
setSelection in interface IListModelselection - the key of the item to selectpublic boolean isSingleSelection()
IListModel
isSingleSelection in interface IListModelpublic void setSingleSelection(boolean isSingleSelection)
IListModel
setSingleSelection in interface IListModelisSingleSelection - true if the model should only
allow single selection.public String getSingleSelection()
IListModel
getSingleSelection in interface IListModelpublic String[] getMultiSelection()
IListModel
getMultiSelection in interface IListModelpublic void addSelection(String selection)
IListModel
addSelection in interface IListModelselection - the key of the item to add to the selectionpublic void removeSelection(String selection)
IListModel
removeSelection in interface IListModelselection - the key of the item to remove from
the selectionpublic void removeItem(String key)
|
SAP NetWeaver 2004S SPS 10 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||