Vaadin TextField action at every key pressed
问题 In Vaadin 7 there are no KeyListener in TextField only on EnterKey press. I'm looking for an add-on which contains a SuperImmediateTextField but compatible with Vaadin 7. I use Vaadin version 7.1.8 回答1: You can use TextChangeListener. For example: // Text field with maximum length final TextField tf = new TextField("My Eventful Field"); tf.setValue("Initial content"); tf.setMaxLength(20); // Counter for input length final Label counter = new Label(); counter.setValue(tf.getValue().length() +