From 1a5891316dece4453b91d412fb1acef3e5d2bc41 Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Mon, 22 Nov 2010 05:56:43 +0000 Subject: [PATCH] Input prompt support svn changeset:16078/svn branch:6.5 --- .../components/combobox/ComboBoxes2.java | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/tests/src/com/vaadin/tests/components/combobox/ComboBoxes2.java b/tests/src/com/vaadin/tests/components/combobox/ComboBoxes2.java index 3a92289a45..92e9c29595 100644 --- a/tests/src/com/vaadin/tests/components/combobox/ComboBoxes2.java +++ b/tests/src/com/vaadin/tests/components/combobox/ComboBoxes2.java @@ -1,11 +1,19 @@ package com.vaadin.tests.components.combobox; +import java.util.LinkedHashMap; + import com.vaadin.terminal.Resource; import com.vaadin.tests.components.select.AbstractSelectTestCase; import com.vaadin.ui.ComboBox; public class ComboBoxes2 extends AbstractSelectTestCase { + private Command inputPromptCommand = new Command() { + public void execute(ComboBox c, String value, Object data) { + c.setInputPrompt(value); + } + }; + @Override protected Class getTestClass() { return ComboBox.class; @@ -15,6 +23,17 @@ public class ComboBoxes2 extends AbstractSelectTestCase { protected void createActions() { super.createActions(); createItemIconSelect(CATEGORY_DATA_SOURCE); + createInputPromptAction(CATEGORY_FEATURES); + } + + private void createInputPromptAction(String category) { + LinkedHashMap options = new LinkedHashMap(); + options.put("-", null); + options.put("Enter a value", "Enter a value"); + options.put("- Click here -", "- Click here -"); + createSelectAction("Input prompt", category, options, "-", + inputPromptCommand); + } private void createItemIconSelect(String category) { -- 2.39.5