package com.vaadin.tests.tickets; import java.util.Iterator; import java.util.LinkedList; import com.vaadin.shared.ui.label.ContentMode; import com.vaadin.ui.AbstractField; import com.vaadin.ui.Button; import com.vaadin.ui.Button.ClickEvent; import com.vaadin.ui.Label; import com.vaadin.ui.UI.LegacyWindow; import com.vaadin.ui.Select; import com.vaadin.ui.Window; public class Ticket1819 extends com.vaadin.Application.LegacyApplication { LinkedList(); @Override public void init() { final LegacyWindow main = new LegacyWindow("#1819"); setMainWindow(main); com.vaadin.ui.Select s; s = new Select("Select with null selection allowed"); s.setNullSelectionAllowed(true); listOfAllFields.add(s); s = new Select("Select with null selection NOT allowed"); s.setNullSelectionAllowed(false); listOfAllFields.add(s); for (Iterator i = listOfAllFields.iterator(); i .hasNext();) { AbstractField af = i.next(); msg.append("

" + af.getCaption() + "

\n"); msg.append("Value=" + af.getValue() + "
\n"); } Window w = new Window("Status of the fields"); w.setModal(true); w.addComponent(new Label(msg.toString(), ContentMode.XHTML)); main.addWindow(w); } }); } }