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.

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Select vs FilesystemContainer
Given the following snippet:
final Property itemProperty = competitionItem.getItemProperty(fieldName);
FilesystemContainer fsContainer = new FilesystemContainer(new File(baseDirectory,"/WEB-INF/classes/templates"),false);
Select fileSelector = new Select(caption, fsContainer);
fileSelector.setPropertyDataSource(itemProperty);
The problem I have is that the Select field does not show the value of the item property on initial display. Changing the value by selecting a value does change the property and the underlying Pojo (as attested by traces in the Property.ValueChangeListener). Once a value has been selected, things work fine, until which time I rebuild the view.
Any advice or example welcome.
Does itemProperty.getValue() return a File object? FileSystemContainer uses File objects as item ids. The following code at least works:
final Property itemProperty = new ObjectProperty(
new File("C:\\windows"));
FilesystemContainer fsContainer = new FilesystemContainer(new File(
"C:\\"), false);
Select fileSelector = new Select("File system", fsContainer);
fileSelector.setPropertyDataSource(itemProperty);
Thanks!
Short of reading the fine source (RTFS), is there any way of guessing what the item type is ? As a suggestion, this would be useful information to be written in the JavaDoc, and at first glance I could not readily see why the signature of the API was not made more specific.