Open a combobox

Hello everybody

Is there a way to automatically open a combobox with java code ?
Maybe simulating user click ?

Thanks.

up

Sorry, no, not at the moment. What would your use case be?

I make a custom navigation breadcrumb like in explorer on windows vista/7.
So i must have a button and when we click on, a combobox is shown and is opened.
But I have find a solution using javascript (onclick() on ie and createEvent(“MouseEvents”) on others)
It’s a really good think we can use javascript with vaadin but it would be better that we can put javascript id on vaadin components.
Here my solution get clickable item by classname. It’s not really efficient.

Hi,

I’d suggest looking into themeing the ComboBox (or perhaps MenuBar would be simpler?) to
look like
a button using CSS. This would be way easier than getting a ComboBox to open programmatically.

The book has some
instructions
and there should be a wiki page on themeing somewhere, but I couldn’t find it after a quick look.

HTH,
/Jonatan

This feature ( openPopup() and openPopup(int page) methods ) is included in [PrefixComboBox add-on]
(https://vaadin.com/directory/component/prefixcombobox) for Vaadin 8, which an extended ComboBox, a collection of missing features.