/** * Sets the option filtering mode. * <p> * Only applies to select field with backing components supporting a suggestion popup. * </p> * @param filteringMode the filtering mode to use */ public void setFilteringMode(FilteringMode filteringMode) { if (getInternalField() instanceof ComboBox) { ((ComboBox) getInternalField()).setFilteringMode(filteringMode); } }
/** * Creates a new instance.<P> */ public CmsLoginOuSelector() { m_ouSelect.setWidth("100%"); setCompositionRoot(m_ouSelect); m_ouSelect.setFilteringMode(FilteringMode.CONTAINS); m_ouSelect.setNullSelectionAllowed(false); }
protected AbstractField createTextField() { ComboBox out = new ComboBox(); out.setItemCaptionPropertyId("title"); out.setItemCaptionMode(AbstractSelect.ITEM_CAPTION_MODE_PROPERTY); out.setFilteringMode(Filtering.FILTERINGMODE_CONTAINS); out.setNullSelectionAllowed(false); //TODO container = new IndexedContainer(); // container.addContainerProperty("id", String.class, ""); container.addContainerProperty("title", String.class, ""); out.setContainerDataSource(container); return out; }
private ComboBox getDsComboField() { final Container container = createContainer(); final ComboBox dsComboBox = SPUIComponentProvider.getComboBox(i18n.getMessage("bulkupload.ds.name"), "", null, null, false, "", i18n.getMessage("bulkupload.ds.name")); dsComboBox.setSizeUndefined(); dsComboBox.addStyleName(SPUIDefinitions.BULK_UPLOD_DS_COMBO_STYLE); dsComboBox.setImmediate(true); dsComboBox.setFilteringMode(FilteringMode.STARTSWITH); dsComboBox.setPageLength(7); dsComboBox.setContainerDataSource(container); dsComboBox.setItemCaptionPropertyId(SPUILabelDefinitions.VAR_NAME_VERSION); dsComboBox.setId(UIComponentIdProvider.BULK_UPLOAD_DS_COMBO); dsComboBox.setWidth("100%"); return dsComboBox; }
private ComboBox getDsComboField() { final Container container = createContainer(); final ComboBox dsComboBox = SPUIComponentProvider.getComboBox(i18n.getMessage("bulkupload.ds.name"), "", null, null, false, "", i18n.getMessage("bulkupload.ds.name")); dsComboBox.setSizeUndefined(); dsComboBox.addStyleName(SPUIDefinitions.BULK_UPLOD_DS_COMBO_STYLE); dsComboBox.setImmediate(true); dsComboBox.setFilteringMode(FilteringMode.STARTSWITH); dsComboBox.setPageLength(7); dsComboBox.setContainerDataSource(container); dsComboBox.setItemCaptionPropertyId(SPUILabelDefinitions.VAR_NAME_VERSION); dsComboBox.setId(UIComponentIdProvider.BULK_UPLOAD_DS_COMBO); dsComboBox.setWidth("100%"); return dsComboBox; }
m_fieldJobClass.setFilteringMode(FilteringMode.OFF); m_fieldCron.setFilteringMode(FilteringMode.OFF); m_fieldCron.setNewItemsAllowed(true); m_fieldJobClass.setNewItemsAllowed(true);
private void initOppilaitostyyppi() { KoodistoComponent koodistOLTyyppi = WidgetFactory.create(KOODISTO_OPPILAITOSTYYPPI_URI); koodistOLTyyppi.setCaption(I18N.getMessage("c_olTyyppi")); oppilaitosTyyppi = new ComboBox(); oppilaitosTyyppi.setDebugId(createDebugId("olTyyppiSearch")); oppilaitosTyyppi.setFilteringMode(Filtering.FILTERINGMODE_CONTAINS); oppilaitosTyyppi.setImmediate(true); koodistOLTyyppi.setField(oppilaitosTyyppi); koodistOLTyyppi.setPropertyDataSource(new NestedMethodProperty(model, "oppilaitosTyyppi")); rightPanel.addComponent(koodistOLTyyppi); koodistOLTyyppi.addListener(new Property.ValueChangeListener() { @Override public void valueChange(ValueChangeEvent event) { //DEBUGSAWAY:log.debug("oppilaitosTyyppi"); tree.reloadWithSearchData(model); } }); }
/** * Prepares a combo box.<p> * * @param container the indexed item container * @param captionKey the caption message key * * @return the combo box */ private ComboBox prepareComboBox(IndexedContainer container, String captionKey) { ComboBox result = new ComboBox(CmsVaadinUtils.getWpMessagesForCurrentLocale().key(captionKey), container); result.setTextInputAllowed(true); result.setNullSelectionAllowed(false); result.setWidth("100%"); result.setInputPrompt( Messages.get().getBundle(UI.getCurrent().getLocale()).key(Messages.GUI_EXPLORER_CLICK_TO_EDIT_0)); result.setItemCaptionPropertyId(CAPTION_PROPERTY); result.setFilteringMode(FilteringMode.CONTAINS); return result; } }
/** * Prepares a combo box.<p> * * @param container the indexed item container * @param captionKey the caption message key * * @return the combo box */ private ComboBox prepareComboBox(IndexedContainer container, String captionKey) { ComboBox result = new ComboBox(CmsVaadinUtils.getWpMessagesForCurrentLocale().key(captionKey), container); result.setTextInputAllowed(true); result.setNullSelectionAllowed(false); result.setWidth("100%"); result.setInputPrompt( Messages.get().getBundle(UI.getCurrent().getLocale()).key(Messages.GUI_EXPLORER_CLICK_TO_EDIT_0)); result.setItemCaptionPropertyId(CAPTION_PROPERTY); result.setFilteringMode(FilteringMode.CONTAINS); return result; } }
boolean online = cms.getRequestContext().getCurrentProject().isOnlineProject(); m_searchType.setFilteringMode(FilteringMode.OFF); m_searchType.setNullSelectionAllowed(false); m_searchType.addItem(SearchType.fullText); if (OpenCms.getSearchManager().getSolrServerConfiguration().isEnabled()) { m_searchIndex.setFilteringMode(FilteringMode.OFF); m_searchIndex.setNullSelectionAllowed(false); String selectIndex = null; m_locale.setFilteringMode(FilteringMode.OFF); for (Locale locale : OpenCms.getLocaleManager().getAvailableLocales()) { m_locale.addItem(locale);
combo.setItemCaptionPropertyId(SITE_CAPTION); combo.select(cms.getRequestContext().getSiteRoot()); combo.setFilteringMode(FilteringMode.CONTAINS); combo.addValueChangeListener(new ValueChangeListener() {
m_childServiceComponent.setImmediate(true); m_childServiceComponent.setValidationVisible(true); m_childServiceComponent.setFilteringMode(FilteringMode.CONTAINS); m_childServiceComponent.addItems(businessServiceManager.getFeasibleChildServices(businessService).stream() .sorted(Ordering.natural() m_ipServiceComponent.setImmediate(true); m_ipServiceComponent.setValidationVisible(true); m_ipServiceComponent.setFilteringMode(FilteringMode.CONTAINS); m_ipServiceComponent.addItems(businessServiceManager.getAllIpServices().stream() .sorted(Ordering.natural()
getSiteSelector().setNullSelectionAllowed(false); getSiteSelector().setItemCaptionPropertyId(PROPERTY_SITE_CAPTION); getSiteSelector().setFilteringMode(FilteringMode.CONTAINS); getSiteSelector().addValueChangeListener(new ValueChangeListener() {
this.sortComboBox.setNewItemsAllowed(false); this.sortComboBox.setTextInputAllowed(false); this.sortComboBox.setFilteringMode(FilteringMode.OFF); this.sortComboBox.setItemCaptionMode(AbstractSelect.ItemCaptionMode.PROPERTY); this.sortComboBox.setItemCaptionPropertyId(SortKeyContainer.DESCRIPTION_PROPERTY);
this.sortComboBox.setNewItemsAllowed(false); this.sortComboBox.setTextInputAllowed(false); this.sortComboBox.setFilteringMode(FilteringMode.OFF); this.sortComboBox.setItemCaptionMode(AbstractSelect.ItemCaptionMode.PROPERTY); this.sortComboBox.setItemCaptionPropertyId(SortKeyContainer.DESCRIPTION_PROPERTY);