From: Matti Tahvonen Date: Mon, 12 Jan 2009 13:12:35 +0000 (+0000) Subject: Added descriptions to form example (to work as a better test case) X-Git-Tag: 6.7.0.beta1~3360 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=93d7d4d52d7cb9aed3bcad81199d8351d39387a5;p=vaadin-framework.git Added descriptions to form example (to work as a better test case) svn changeset:6501/svn branch:trunk --- diff --git a/src/com/itmill/toolkit/demo/featurebrowser/FormExample.java b/src/com/itmill/toolkit/demo/featurebrowser/FormExample.java index 0028f6a2b5..6b60a30409 100644 --- a/src/com/itmill/toolkit/demo/featurebrowser/FormExample.java +++ b/src/com/itmill/toolkit/demo/featurebrowser/FormExample.java @@ -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