public class SuggestionBoxDataModel extends ComboBoxDataModel implements SuggestionBoxListener
ListCallbackHandler
implementation.Constructor and Description |
---|
SuggestionBoxDataModel(ListCallbackHandler handler)
Constructs the class and sets the expression value to
null . |
SuggestionBoxDataModel(String expression,
ListCallbackHandler handler)
Constructs the class and performs filling via the handler.
|
Modifier and Type | Method and Description |
---|---|
protected void |
fill()
This method fills the list with the values.
|
String |
getExpression()
Getter for property 'expression'.
|
protected ListCallbackHandler |
getHandler()
Getter for property 'handler'.
|
void |
onChange(String expression)
This method is invoked every time a user change the value in the
suggestion box.
|
void |
setExpression(String expression)
Setter for property 'expression'.
|
void |
setHandler(ListCallbackHandler handler)
Sets the callback handler that must fill the model with the values on demand.
|
add, add, add, addInternally, addListModelListener, clear, fireEvent, get, get, getCount, getItemIds, getItems, getSelected, getSelectedId, getSelectedIndex, getValidIndex, isEmpty, isIndexValid, remove, remove, removeInternally, removeListModelListener, setSelectedId, setSelectedIndex
public SuggestionBoxDataModel(ListCallbackHandler handler)
null
.handler
- is a handler to fill data.public SuggestionBoxDataModel(String expression, ListCallbackHandler handler)
expression
- an expression to be used for filtering.handler
- a callback handler to fill the list.public String getExpression()
public void setExpression(String expression)
expression
- Value to set for property 'expression'.public void onChange(String expression)
onChange
in interface SuggestionBoxListener
expression
- is an expression.public void setHandler(ListCallbackHandler handler)
handler
- is a handler to set.protected ListCallbackHandler getHandler()
protected void fill()
Copyright © 2008–2013. All rights reserved.