|
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.Component
com.sapportals.htmlb.EventValidationComponent
com.sapportals.htmlb.ListBox
Title: List Box Description: This class renders a List Box.
Copyright 2004 SAP AG
| Field Summary | |
static String |
UI_ID
|
| Constructor Summary | |
ListBox(String name)
Creates a ListBox |
|
| Method Summary | |
void |
addItem(String key,
String text)
Inserts a new item at the end of the list. |
void |
addSelection(String selection)
Add an item to the selected items list |
protected IListModel |
createDefaultModel()
Internal constructor for a default ListModel. |
Iterator |
getKeys()
get an Iterator for all keys contained
in this DropdownListBox |
IListModel |
getModel()
get the model underlying this ListBox |
String[] |
getMultiSelection()
Returns a list of selected items |
String |
getNameOfKeyColumn()
get the name of the column that contains the keys. |
String |
getNameOfValueColumn()
get the name of the column that contains the visible texts. |
String |
getOnClientSelect()
get the JavaScript fragment that is executed on the client side if the user changes the selection |
String |
getOnSelect()
get the event identifier for a selection event. |
String |
getSingleSelection()
Returns the selected items |
int |
getSize()
Returns the size of ListBox rendered in the HTML-Tag <select size="size" |
String |
getTextForKey(String key)
Returns the text of a ListBox item |
String |
getTooltip()
gets the Tooltip for this ListBox. |
String |
getUI()
get a identification String for the renderer that is unique across all supported components. |
String |
getWidth()
Returns the width of ListBox rendered in the HTML-Tag <select ... style="width:xxx;" |
protected void |
initFromPageContext(IPageContext pc,
String baseId)
internal use only. |
boolean |
isLabeled()
checks if a label has been assigned to this component. |
boolean |
isSelected(String key)
Checks if an item is in the selected item list |
void |
removeSelection(String selection)
Removes an item from the selected items list |
void |
setLabeled(boolean isLabeled)
notify the component that a label has been assigned to it. |
void |
setModel(IListModel model)
set the model for this ListBox |
void |
setNameOfKeyColumn(String nameOfKeyColumn)
specify the name of the column that contains the keys. |
void |
setNameOfValueColumn(String nameOfValueColumn)
specify the name of the column that contains the visible texts. |
void |
setOnClientSelect(String onClientSelect)
specify a clientside JavaScript that should be executed if the user changes the selection |
void |
setOnSelect(String onSelect)
set the event identifier for a selection event. |
void |
setSingleSelection(String selection)
Returns the selected items |
void |
setSize(int size)
Sets the size of ListBox rendered in the HTML-Tag <select size="size" |
void |
setTooltip(String tooltip)
sets the Tooltip for this ListBox. |
void |
setWidth(String width)
Sets the width of ListBox rendered in the HTML-Tag <select ... style="width:xxx;" |
| Methods inherited from class com.sapportals.htmlb.EventValidationComponent |
getAllValidators, getClientEvent, getClientEventMap, getErrorText, getServerEvent, getServerEventMap, getValidator, isDisabled, isEnabled, isRequiresValidation, renderJavascriptInterface, setClientEvent, setDisabled, setEnabled, setErrorText, setRequiresValidation, setServerEvent, setValidator |
| Methods inherited from class com.sapportals.htmlb.Component |
getEncodedIdForForm, getId, getParent, initFromShortId, initializeFromId, isJsObjectNeeded, preRender, render, renderAsString, requiresForm, setId, setJsObjectNeeded, setParent |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final String UI_ID
| Constructor Detail |
public ListBox(String name)
name - the ListBox name| Method Detail |
protected void initFromPageContext(IPageContext pc,
String baseId)
initFromPageContext in class Componentpc - the context, including the parametersbaseId - the prefix used for the component. (The
result of a former RenderUtil.getIdForForm(rc, c);)protected IListModel createDefaultModel()
public IListModel getModel()
public void setModel(IListModel model)
model - the modelpublic int getSize()
public void setSize(int size)
size - the sizepublic String getWidth()
public void setWidth(String width)
width - the widthpublic String[] getMultiSelection()
public void addSelection(String selection)
selection - Key of the item to be added to the selected item listpublic void removeSelection(String selection)
selection - Key of the item to be deleted from the selected item listpublic String getSingleSelection()
public void setSingleSelection(String selection)
public boolean isSelected(String key)
key - the key to check
public String getNameOfKeyColumn()
public void setNameOfKeyColumn(String nameOfKeyColumn)
nameOfKeyColumn - the name/identifier of the key columnpublic String getNameOfValueColumn()
public void setNameOfValueColumn(String nameOfValueColumn)
nameOfValueColumn - the name/identifier of the key columnpublic String getTooltip()
public void setTooltip(String tooltip)
tooltip - the tooltip textpublic String getOnSelect()
public void setOnSelect(String onSelect)
onSelect - the identifier for the eventpublic String getOnClientSelect()
public void setOnClientSelect(String onClientSelect)
onClientSelect - a JavaScript fragment.public String getUI()
getUI in class Component
public void addItem(String key,
String text)
key - The key name of the itemtext - The text displayed in the ListBoxpublic String getTextForKey(String key)
key - The key of ListBox item
public Iterator getKeys()
Iterator for all keys contained
in this DropdownListBox
public void setLabeled(boolean isLabeled)
LabeledComponent
setLabeled in interface LabeledComponentpublic boolean isLabeled()
LabeledComponent
isLabeled in interface LabeledComponent
|
SAP NetWeaver 2004S SPS 10 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||