From: Artur Signell Date: Mon, 25 Jul 2011 14:05:22 +0000 (+0000) Subject: Added simple setValue command for Table and fixed Column vs Property typo X-Git-Tag: 6.7.0.beta1~174 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=cf10a42a2c068ec802906dc44ab4df3bba6bb507;p=vaadin-framework.git Added simple setValue command for Table and fixed Column vs Property typo svn changeset:19926/svn branch:6.7 --- diff --git a/tests/src/com/vaadin/tests/components/abstractfield/AbstractFieldTest.java b/tests/src/com/vaadin/tests/components/abstractfield/AbstractFieldTest.java index 79ec0d1bf6..1c8e728908 100644 --- a/tests/src/com/vaadin/tests/components/abstractfield/AbstractFieldTest.java +++ b/tests/src/com/vaadin/tests/components/abstractfield/AbstractFieldTest.java @@ -156,7 +156,7 @@ public abstract class AbstractFieldTest extends } } }; - private Command setValueCommand = new Command() { + protected Command setValueCommand = new Command() { public void execute(T c, Object value, Object data) { c.setValue(value); diff --git a/tests/src/com/vaadin/tests/components/table/Tables.java b/tests/src/com/vaadin/tests/components/table/Tables.java index a128879e21..dc11022027 100644 --- a/tests/src/com/vaadin/tests/components/table/Tables.java +++ b/tests/src/com/vaadin/tests/components/table/Tables.java @@ -87,7 +87,7 @@ public class Tables extends AbstractSelectTestCase public void execute(Table c, Integer value, Object data) { if (value == Table.ROW_HEADER_MODE_PROPERTY) { - c.setItemCaptionPropertyId("Column 3"); + c.setItemCaptionPropertyId("Property 3"); } c.setRowHeaderMode(value); } @@ -150,6 +150,7 @@ public class Tables extends AbstractSelectTestCase createPageLengthSelect(CATEGORY_SIZE); createSelectionModeSelect(CATEGORY_SELECTION); + createValueSelection(CATEGORY_SELECTION); createItemClickListener(CATEGORY_LISTENERS); createColumnResizeListenerCheckbox(CATEGORY_LISTENERS); @@ -172,6 +173,16 @@ public class Tables extends AbstractSelectTestCase } + private void createValueSelection(String categorySelection) { + LinkedHashMap options = new LinkedHashMap(); + options.put("null", null); + for (int i = 1; i <= 10; i++) { + options.put("Item " + i, "Item " + i); + } + createSelectAction("Value", categorySelection, options, null, + setValueCommand); + } + private void createContextMenuAction(String category) { LinkedHashMap options = new LinkedHashMap(); options.put("None", null); @@ -243,7 +254,7 @@ public class Tables extends AbstractSelectTestCase options.put("Id", Table.ROW_HEADER_MODE_ID); options.put("Index", Table.ROW_HEADER_MODE_INDEX); options.put("Item", Table.ROW_HEADER_MODE_ITEM); - options.put("'Column 3' property", Table.ROW_HEADER_MODE_PROPERTY); + options.put("'Property 3' property", Table.ROW_HEADER_MODE_PROPERTY); createSelectAction("Row header mode", category, options, "Hidden", rowHeaderModeCommand);