Label and ValueChangeListener

Hello! A’ve code


public class TestchangelistenerUI extends UI {

	@Override
	protected void init(VaadinRequest request) {
		final VerticalLayout layout = new VerticalLayout();
		layout.setMargin(true);
		setContent(layout);

		final TextField tf = new TextField();
		final Label label = new Label();
		final Label label2 = new Label();
				
		tf.setTextChangeEventMode(TextChangeEventMode.EAGER);
		tf.addTextChangeListener(new TextChangeListener() {
			
			@Override
			public void textChange(TextChangeEvent event) {
				System.out.println("!!!!");
				tf.setValue(event.getText());
				label.setValue(tf.getValue());
			}
		});	
		
		label.addValueChangeListener(new Property.ValueChangeListener() {

			@Override
			public void valueChange(ValueChangeEvent event) {
				System.out.println("Here!");
				label2.setValue(label.getValue());
			}
		});

		layout.addComponent(tf);
		layout.addComponent(label);
		layout.addComponent(label2);
	}

when I type in text field label2’s value isn’t change and method valueChange do not call.
(in output I see only “!!!”).
What am I doing wrong?

you probably want a tf.setImmediate(true); in there, which tells the field to update the value immediately when the browser has something new to send to the server.

Jens, thank you for reply!
I try to add tf.setImmediate(true); but code do not work too. I try to use fireEvent method, but didn’t get any result.
If I declare label as TextField listener catch ValueChangeEvent.