]> source.dussan.org Git - vaadin-framework.git/commitdiff
Fix for #3588
authorJohn Alhroos <john.ahlroos@itmill.com>
Mon, 17 May 2010 10:35:02 +0000 (10:35 +0000)
committerJohn Alhroos <john.ahlroos@itmill.com>
Mon, 17 May 2010 10:35:02 +0000 (10:35 +0000)
svn changeset:13212/svn branch:6.3

src/com/vaadin/terminal/gwt/client/ui/VTextField.java

index 2f8d8edff9fd09c11d431e09b904c43a8987802f..7594bde3b13668932ac06474b877e7d33619a87d 100644 (file)
@@ -118,7 +118,7 @@ public class VTextField extends TextBoxBase implements Paintable, Field,
 
         final String fieldValue;
         if (prompting) {
-            fieldValue = inputPrompt;
+            fieldValue = isReadOnly() ? "" : inputPrompt;
             addStyleDependentName(CLASSNAME_PROMPT);
         } else {
             fieldValue = text;
@@ -234,7 +234,7 @@ public class VTextField extends TextBoxBase implements Paintable, Field,
         String text = getText();
         setPrompting(inputPrompt != null && (text == null || "".equals(text)));
         if (prompting) {
-            setText(inputPrompt);
+            setText(isReadOnly() ? "" : inputPrompt);
             addStyleDependentName(CLASSNAME_PROMPT);
         }