summaryrefslogtreecommitdiffstats
path: root/uitest/src
diff options
context:
space:
mode:
authorLeif Åstrand <leif@vaadin.com>2012-10-02 06:24:26 +0000
committerVaadin Code Review <review@vaadin.com>2012-10-02 06:24:26 +0000
commit233be6f0e57c5a991e4d8587ce13d7010377d2a9 (patch)
tree46dba74f385e93e03b8a550434b498fdc99236e4 /uitest/src
parentf023100342b7245c97984129d1ad5a56e848f1e8 (diff)
parentdef50dcdd7f28f9f4f92fb723191049f67fd21e4 (diff)
downloadvaadin-framework-233be6f0e57c5a991e4d8587ce13d7010377d2a9.tar.gz
vaadin-framework-233be6f0e57c5a991e4d8587ce13d7010377d2a9.zip
Merge changes Iae2ac641,I50a0ac7a
* changes: Made GlobalResourceHandler serializable (#9817) Updated GAE test to be UI based (#9816)
Diffstat (limited to 'uitest/src')
-rwxr-xr-xuitest/src/com/vaadin/tests/integration/IntegrationTestUI.java42
1 files changed, 42 insertions, 0 deletions
diff --git a/uitest/src/com/vaadin/tests/integration/IntegrationTestUI.java b/uitest/src/com/vaadin/tests/integration/IntegrationTestUI.java
new file mode 100755
index 0000000000..05683e7b4e
--- /dev/null
+++ b/uitest/src/com/vaadin/tests/integration/IntegrationTestUI.java
@@ -0,0 +1,42 @@
+package com.vaadin.tests.integration;
+
+import com.vaadin.data.Item;
+import com.vaadin.data.Property.ValueChangeEvent;
+import com.vaadin.data.Property.ValueChangeListener;
+import com.vaadin.server.ClassResource;
+import com.vaadin.server.Resource;
+import com.vaadin.server.VaadinRequest;
+import com.vaadin.ui.Label;
+import com.vaadin.ui.Table;
+import com.vaadin.ui.UI;
+
+public class IntegrationTestUI extends UI {
+ @Override
+ protected void init(VaadinRequest request) {
+ final Table table = new Table();
+ table.addContainerProperty("icon", Resource.class, null);
+ table.setItemIconPropertyId("icon");
+ table.addContainerProperty("country", String.class, null);
+ table.setRowHeaderMode(Table.RowHeaderMode.ICON_ONLY);
+ table.setImmediate(true);
+ table.setSelectable(true);
+ table.setVisibleColumns(new Object[] { "country" });
+ addComponent(table);
+
+ Item item = table.addItem("FI");
+ item.getItemProperty("icon").setValue(new ClassResource("fi.gif"));
+ item.getItemProperty("country").setValue("Finland");
+ item = table.addItem("SE");
+ item.getItemProperty("icon").setValue(new FlagSeResource());
+ item.getItemProperty("country").setValue("Sweden");
+
+ final Label selectedLabel = new Label();
+ table.addValueChangeListener(new ValueChangeListener() {
+ @Override
+ public void valueChange(ValueChangeEvent event) {
+ selectedLabel.setValue(table.getValue().toString());
+ }
+ });
+ addComponent(selectedLabel);
+ }
+}