]> source.dussan.org Git - vaadin-framework.git/commitdiff
Added descriptions to form example (to work as a better test case)
authorMatti Tahvonen <matti.tahvonen@itmill.com>
Mon, 12 Jan 2009 13:12:35 +0000 (13:12 +0000)
committerMatti Tahvonen <matti.tahvonen@itmill.com>
Mon, 12 Jan 2009 13:12:35 +0000 (13:12 +0000)
svn changeset:6501/svn branch:trunk

src/com/itmill/toolkit/demo/featurebrowser/FormExample.java

index 0028f6a2b50d659e6183717ae283c56713160ef2..6b60a304096898e1b249c6521d40ad84bc460183 100644 (file)
@@ -93,10 +93,18 @@ public class FormExample extends CustomComponent {
             // here. The alternative way is to use custom field factory as shown
             // above.
             getField("name").setRequired(true);
+            getField("name").setDescription("Please enter name");
             getField("name").setRequiredError("Name is missing");
             getField("streetAddress").setRequired(true); // No error message
+            getField("streetAddress").setDescription(
+                    "Please enter street adderss.");
             getField("postalCode").setRequired(true); // No error message
+            getField("postalCode").setDescription(
+                    "Please enter postal code. Example: 12345.");
             replaceWithSelect("city", cities, cities).setNewItemsAllowed(true);
+            getField("city")
+                    .setDescription(
+                            "Select city from list or type it. City field is not required.");
 
             // Set the form to act immediately on user input. This is
             // automatically transports data between the client and the server