Hi,
I’m noticing this behavior for the Select widget. If I use the default Select, I don’t see the null selection item id that I specify, but if I switch the select to be the NativeSelect, I can see it for the same code… Is this by design? If yes, could you tell how to show the null selection item value I specify for the Select component?
— code —
Select opts = new Select("Select caption");
// AbstractSelect opts = new NativeSelect("Select caption"); //The null selection item shows up for this!
opts.addItem("Test 1");
opts.addItem("Test 2");
String nullItem = "-- Select one --";
opts.setNullSelectionItemId(nullItem);
opts.setValue(nullItem);
opts.setImmediate(true);
opts.addListener(new Property.ValueChangeListener() {
public void valueChange(Property.ValueChangeEvent event) {
getMainWindow().showNotification("Selected item: " + event.getProperty());
}
});
btw, is there a way to attach screenshots to forum messages without uploading it elsewhere and directly embedding in the post via an attachment?