From 8261119748530ec2638320a9fcfc2bc634c6b278 Mon Sep 17 00:00:00 2001 From: Matti Tahvonen Date: Mon, 18 Apr 2011 14:10:49 +0000 Subject: svn changeset:18358/svn branch:6.5 --- .../textfield/TextChangeEventsEternalLoop.java | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 tests/src/com/vaadin/tests/components/textfield/TextChangeEventsEternalLoop.java (limited to 'tests') diff --git a/tests/src/com/vaadin/tests/components/textfield/TextChangeEventsEternalLoop.java b/tests/src/com/vaadin/tests/components/textfield/TextChangeEventsEternalLoop.java new file mode 100644 index 0000000000..22348bb5b5 --- /dev/null +++ b/tests/src/com/vaadin/tests/components/textfield/TextChangeEventsEternalLoop.java @@ -0,0 +1,32 @@ +package com.vaadin.tests.components.textfield; + +import com.vaadin.event.FieldEvents.TextChangeEvent; +import com.vaadin.event.FieldEvents.TextChangeListener; +import com.vaadin.tests.components.TestBase; +import com.vaadin.ui.TextField; + +public class TextChangeEventsEternalLoop extends TestBase { + @Override + protected void setup() { + + final TextField tf = new TextField("Debug"); + getLayout().addComponent(tf); + + tf.addListener(new TextChangeListener() { + public void textChange(TextChangeEvent event) { + tf.setValue(event.getText()); + } + }); + } + + @Override + protected String getDescription() { + return "Moving current text to value in text change listener should not cause eternal loop."; + } + + @Override + protected Integer getTicketNumber() { + return 6376; + } + +} \ No newline at end of file -- cgit v1.2.3