public class ComboBoxConnector extends AbstractListingConnector implements SimpleManagedLayout
SIGNIFICANT_MOVE_THRESHOLD| Constructor and Description |
|---|
ComboBoxConnector() |
| Modifier and Type | Method and Description |
|---|---|
void |
clearNewItemHandlingIfMatch(String value)
Clears the new item handling variables if the given value matches the
pending value.
|
ComboBoxState |
getState()
Returns the shared state object for this connector.
|
VComboBox |
getWidget()
Returns the widget associated with this paintable.
|
protected void |
init()
Called when the connector has been initialized.
|
boolean |
isRequiredIndicatorVisible()
Checks if a required indicator should be shown for the given connector.
|
void |
layout() |
void |
onStateChanged(StateChangeEvent stateChangeEvent)
Notifies the event handler that the state has changed.
|
void |
onUnregister()
Event called when connector has been unregistered.
|
void |
requestPage(int page,
String filter)
Send a message to the server to request a page of items with the current
filter.
|
void |
sendBlurEvent()
Notify the server that the combo box lost focus.
|
void |
sendFocusEvent()
Notify the server that the combo box received focus.
|
void |
sendNewItem(String itemValue)
Send a message about a newly created item to the server.
|
void |
sendSelection(String selectionKey)
Send a message to the server updating the current selection.
|
void |
setDataSource(DataSource<JsonObject> dataSource)
Sets the data source for this Connector.
|
protected void |
setFilter(String filter)
Send a message to the server set the current filter.
|
void |
setWidgetEnabled(boolean widgetEnabled)
Sets the enabled state of the widget associated to this connector.
|
getDataSource, getRowData, getRowKey, isRowSelectedisReadOnly, updateWidgetStyleNamescreateWidget, delegateCaptionHandling, flush, getIcon, getIconUri, getLayoutManager, getTooltipInfo, hasTooltip, isErrorIndicatorVisible, isRealUpdate, isRelativeHeight, isRelativeWidth, isUndefinedHeight, isUndefinedWidth, onDragSourceAttached, onDragSourceDetached, onDropTargetAttached, onDropTargetDetached, registerTouchHandlers, sendContextClickEvent, setWidgetStyleName, setWidgetStyleNameWithPrefix, shouldHandleLongTap, unregisterTouchHandlers, updateComponentSize, updateComponentSize, updateEnabledState, updateWidgetSizeaddStateChangeHandler, addStateChangeHandler, createState, doInit, ensureHandlerManager, fireEvent, forceStateChange, getChildren, getConnection, getConnectorId, getParent, getResourceUrl, getRpcImplementations, getRpcProxy, getStateType, getTag, hasEventListener, isEnabled, registerRpc, removeStateChangeHandler, removeStateChangeHandler, setChildren, setParent, setTag, unregisterRpcclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdelegateCaptionHandling, flush, getLayoutManager, getTooltipInfo, hasTooltip, isRelativeHeight, isRelativeWidth, isUndefinedHeight, isUndefinedWidthaddStateChangeHandler, addStateChangeHandler, doInit, fireEvent, getChildren, getConnection, getParent, getRpcImplementations, getTag, hasEventListener, isEnabled, removeStateChangeHandler, removeStateChangeHandler, setChildren, setParent, setTag, updateEnabledStategetConnectorIdprotected void init()
AbstractConnectorinit in class AbstractConnectorpublic void onStateChanged(StateChangeEvent stateChangeEvent)
StateChangeEvent.StateChangeHandleronStateChanged in interface StateChangeEvent.StateChangeHandleronStateChanged in class AbstractComponentConnectorstateChangeEvent - the state change event with details about the changepublic VComboBox getWidget()
AbstractComponentConnectorgetWidget in interface ComponentConnectorgetWidget in class AbstractComponentConnectorpublic ComboBoxState getState()
AbstractConnectorgetState in interface ComponentConnectorgetState in interface ServerConnectorgetState in class AbstractListingConnectorpublic void layout()
layout in interface SimpleManagedLayoutpublic void setWidgetEnabled(boolean widgetEnabled)
ComponentConnectorsetWidgetEnabled in interface ComponentConnectorsetWidgetEnabled in class AbstractComponentConnectorwidgetEnabled - true if the widget should be enabled, false otherwisepublic void sendNewItem(String itemValue)
itemValue - user entered string value for the new itemprotected void setFilter(String filter)
filter - the current filter stringpublic void requestPage(int page,
String filter)
page - the page number to get or -1 to let the server/connector
decide based on current selection (possibly loading more data
from the server)filter - the filter to apply, never nullpublic void sendSelection(String selectionKey)
selectionKey - the current selected item keypublic void sendFocusEvent()
public void sendBlurEvent()
public void setDataSource(DataSource<JsonObject> dataSource)
HasDataSourcesetDataSource in interface HasDataSourcesetDataSource in class AbstractListingConnectordataSource - the new data source, not nullpublic void onUnregister()
ServerConnectoronUnregister in interface ServerConnectoronUnregister in class AbstractComponentConnectorpublic boolean isRequiredIndicatorVisible()
HasRequiredIndicatorisRequiredIndicatorVisible in interface HasRequiredIndicatorisRequiredIndicatorVisible in class AbstractFieldConnectortrue to show an indicator, false
otherwisepublic void clearNewItemHandlingIfMatch(String value)
value - already handled valueCopyright © 2018 Vaadin Ltd. All rights reserved.