com.vaadin.client.ui.
Class VComboBox.DataReceivedHandler
- java.lang.Object
-
- com.vaadin.client.ui.VComboBox.DataReceivedHandler
-
-
Constructor Summary
Constructors Constructor Description DataReceivedHandler()
-
Method Summary
All Methods Modifier and Type Method Description void
clearPendingNavigation()
Called by the connector any pending navigation operations should be cleared.
void
dataReceived()
Called by the connector when new data for the last requested filter is received from the server.
boolean
hasPendingNavigation()
INTERNAL USE ONLY - may be removed or renamed at any time!
boolean
isPending(String value)
boolean
isWaitingForFilteringResponse()
For internal use only - this method will be removed in the future.
boolean
isWaitingForInitialData()
For internal use only - this method will be removed in the future.
void
popupOpenerClicked()
Record that the popup opener has been clicked and the popup should be opened on the next request.
void
reactOnInputWhenReady(String value)
Perform filtering with the user entered string and when the results are received, perform any action appropriate for the user input (select an item or create a new one).
void
serverReplyHandled()
Called by the connector when it has finished handling any reply from the server, regardless of what was updated.
void
setNavigationCallback(Runnable callback)
Set a callback that is invoked when a page change occurs if there have not been intervening requests to the server.
void
updateSelectionFromServer(String selectedKey, String selectedCaption, String selectedIconUri)
Perform selection (if appropriate) based on a reply from the server.
-
-
-
Method Detail
-
dataReceived
public void dataReceived()
Called by the connector when new data for the last requested filter is received from the server.
-
reactOnInputWhenReady
public void reactOnInputWhenReady(String value)
Perform filtering with the user entered string and when the results are received, perform any action appropriate for the user input (select an item or create a new one).
Parameters:
value
- user input
-
isPending
public boolean isPending(String value)
-
hasPendingNavigation
public boolean hasPendingNavigation()
INTERNAL USE ONLY - may be removed or renamed at any time!
Returns:
true
if there is a pending navigation,false otherwise
-
clearPendingNavigation
public void clearPendingNavigation()
Called by the connector any pending navigation operations should be cleared.
-
setNavigationCallback
public void setNavigationCallback(Runnable callback)
Set a callback that is invoked when a page change occurs if there have not been intervening requests to the server. The callback is reset when any additional request is made to the server.
Parameters:
callback
- method to call after filtering has completed
-
popupOpenerClicked
public void popupOpenerClicked()
Record that the popup opener has been clicked and the popup should be opened on the next request. This handles the special case where are not filtering yet and the selected value has changed on the server-side. See #2119. The flag is cleared on each server reply.
-
serverReplyHandled
public void serverReplyHandled()
Called by the connector when it has finished handling any reply from the server, regardless of what was updated.
-
isWaitingForFilteringResponse
public boolean isWaitingForFilteringResponse()
For internal use only - this method will be removed in the future.
Returns:
true if the combo box is waiting for a reply from the server with a new page of data, false otherwise
-
isWaitingForInitialData
public boolean isWaitingForInitialData()
For internal use only - this method will be removed in the future.
Returns:
true if the combo box is waiting for initial data from the server, false otherwise
-
updateSelectionFromServer
public void updateSelectionFromServer(String selectedKey, String selectedCaption, String selectedIconUri)
Perform selection (if appropriate) based on a reply from the server. When this method is called, the suggestions have been reset if new ones (different from the previous list) were received from the server.
Parameters:
selectedKey
- new selected key or null if none given by the serverselectedCaption
- new selected item caption if sent by the server or null - this is used when the selected item is not on the current pageselectedIconUri
- new selected item icon if sent by the server or {@ code null} to clear
-
-