java - Vaadin - ListSelect - set focus on selected item? -


i'm using listselect component of vaadin (version 7.x) , highlight option i've set default selection using setvalue() method - similar happens onclick() event when background colour changes blue , text colour white.

does know how this?

listselect itemlist = new listselect("please select item:");  itemlist.add(initialitem)  for(item item: items) {     if(!item.equals(initialitem.getname())) {         //add item     } itemlist.setvalue(initialitem.getname());  //set focus on intial item make stand out other items 

thanks

use

itemlist.select(initialitem) 

Comments

Popular posts from this blog

Spring Boot + JPA + Hibernate: Unable to locate persister -

go - Golang: panic: runtime error: invalid memory address or nil pointer dereference using bufio.Scanner -

c - double free or corruption (fasttop) -