Change-Id: Ic6da82bc309d90d769e9967feee7fb8a58e9fffcfeature/eventbus
getWidget().filteringmode = getState().filteringMode; | getWidget().filteringmode = getState().filteringMode; | ||||
getWidget().suggestionPopupWidth = getState().suggestionPopupWidth; | |||||
Profiler.leave("ComboBoxConnector.onStateChanged update content"); | Profiler.leave("ComboBoxConnector.onStateChanged update content"); | ||||
} | } | ||||
getWidget().currentPage = uidl.getIntVariable("page"); | getWidget().currentPage = uidl.getIntVariable("page"); | ||||
if (uidl.hasAttribute("suggestionPopupWidth")) { | |||||
getWidget().suggestionPopupWidth = uidl | |||||
.getStringAttribute("suggestionPopupWidth"); | |||||
} else { | |||||
getWidget().suggestionPopupWidth = null; | |||||
} | |||||
getWidget().suggestionPopup.updateStyleNames(getState()); | getWidget().suggestionPopup.updateStyleNames(getState()); | ||||
getWidget().allowNewItem = uidl.hasAttribute("allownewitem"); | getWidget().allowNewItem = uidl.hasAttribute("allownewitem"); |
*/ | */ | ||||
private boolean scrollToSelectedItem = true; | private boolean scrollToSelectedItem = true; | ||||
private String suggestionPopupWidth = null; | |||||
/** | /** | ||||
* If text input is not allowed, the ComboBox behaves like a pretty | * If text input is not allowed, the ComboBox behaves like a pretty | ||||
* NativeSelect - the user can not enter any text and clicking the text | * NativeSelect - the user can not enter any text and clicking the text | ||||
String[] selectedKeys = new String[(getValue() == null | String[] selectedKeys = new String[(getValue() == null | ||||
&& getNullSelectionItemId() == null ? 0 : 1)]; | && getNullSelectionItemId() == null ? 0 : 1)]; | ||||
if (suggestionPopupWidth != null) { | |||||
target.addAttribute("suggestionPopupWidth", | |||||
suggestionPopupWidth); | |||||
} | |||||
// Paints the options and create array of selected id keys | // Paints the options and create array of selected id keys | ||||
int keyIndex = 0; | int keyIndex = 0; | ||||
* @since 7.7 | * @since 7.7 | ||||
*/ | */ | ||||
public String getPopupWidth() { | public String getPopupWidth() { | ||||
return suggestionPopupWidth; | |||||
return getState(false).suggestionPopupWidth; | |||||
} | } | ||||
/** | /** | ||||
* the width | * the width | ||||
*/ | */ | ||||
public void setPopupWidth(String width) { | public void setPopupWidth(String width) { | ||||
suggestionPopupWidth = width; | |||||
markAsDirty(); | |||||
getState().suggestionPopupWidth = width; | |||||
} | } | ||||
/** | /** |
*/ | */ | ||||
public FilteringMode filteringMode = FilteringMode.STARTSWITH; | public FilteringMode filteringMode = FilteringMode.STARTSWITH; | ||||
/** | |||||
* Suggestion pop-up's width as a CSS string. By using relative units (e.g. | |||||
* "50%") it's possible to set the popup's width relative to the ComboBox | |||||
* itself. | |||||
*/ | |||||
public String suggestionPopupWidth = null; | |||||
} | } |