spUICombo.setInputPrompt(prompt);
spUICombo.setInputPrompt(prompt);
/** * 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; } }
combo.setNullSelectionAllowed(false); combo.setWidth("200px"); combo.setInputPrompt( Messages.get().getBundle(UI.getCurrent().getLocale()).key(Messages.GUI_EXPLORER_CLICK_TO_EDIT_0)); combo.setItemCaptionPropertyId(SITE_CAPTION);
m_childServiceComponent.setInputPrompt("No child service selected"); m_childServiceComponent.setNewItemsAllowed(false); m_childServiceComponent.setNullSelectionAllowed(false); m_ipServiceComponent.setInputPrompt("No IP service selected"); m_ipServiceComponent.setNewItemsAllowed(false); m_ipServiceComponent.setNullSelectionAllowed(false);
cb.setInputPrompt("ComboBox"); comboBoxButton.setContent(cb); horizontalLayout.addComponent(comboBoxButton);