Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

TUTORIALVaadin lets you build secure, UX-first PWAs entirely in Java.
Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Calling javascript synchronously by Enver Haase, 1 month ago
"Activating" a ComboBox programatically?
How can you make a ComboBox expand and show it's optons, programatically?
Last updated on
Perhaps you can try something like this:
final ComboBox[] combos = new ComboBox[10];
Property.ValueChangeListener listener = new Property.ValueChangeListener() {
public void valueChange(ValueChangeEvent event) {
StringBuffer sb = new StringBuffer();
for (int i = 0; i < 10; i++) {
sb.append(i > 0 ? "-" : "");
sb.append(combos[i].toString());
}
mainWindow.showNotification("State = " + sb);
}
};
for (int i = 0; i < 10; i++) {
combos[i] = new ComboBox("Box " + i);
combos[i].addListener(listener);
mainWindow.addComponent(combos[i]);
}
Last updated on
You cannot reply to this thread.