final TextField tf = new TextField(
"Required field that validated the input");
tf.setDescription("Enter someting and click outside the field to activate");
tf.setRequired(true);
tf.setImmediate(true);
tf.addListener(new Property.ValueChangeListener() {
@Override
public void valueChange(ValueChangeEvent event) {
w.showNotification("TextField is " + (tf.isValid() ? "" : "in")
+ "valid, with error: " + tf.getErrorMessage(),