From: Marc Englund Date: Fri, 1 Feb 2008 07:32:29 +0000 (+0000) Subject: ComboBox newItemsAllowed=false by default, to avoid mistakes (#1374) X-Git-Tag: 6.7.0.beta1~5125 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=8396a8b2298e6755865531f75d7e905f725cb4e1;p=vaadin-framework.git ComboBox newItemsAllowed=false by default, to avoid mistakes (#1374) May affect applications! Must be prominently noted in changes -file. svn changeset:3691/svn branch:trunk --- diff --git a/src/com/itmill/toolkit/ui/ComboBox.java b/src/com/itmill/toolkit/ui/ComboBox.java index 3f3bd67bce..0125af1d0f 100644 --- a/src/com/itmill/toolkit/ui/ComboBox.java +++ b/src/com/itmill/toolkit/ui/ComboBox.java @@ -9,34 +9,35 @@ import java.util.Collection; import com.itmill.toolkit.data.Container; /** - * A filtering dropdown single-select with newItemsAllowed. Items are filtered - * based on user input, and loaded dynamically ("lazy-loading") from the server. - * You can turn off newItemsAllowed and change filtering mode (and also turn it - * off), but you can not turn on multi-select mode. + * A filtering dropdown single-select. Suitable for newItemsAllowed, but it's + * turned of by default to avoid mistakes. Items are filtered based on user + * input, and loaded dynamically ("lazy-loading") from the server. You can turn + * on newItemsAllowed and change filtering mode (and also turn it off), but you + * can not turn on multi-select mode. * */ public class ComboBox extends Select { public ComboBox() { setMultiSelect(false); - setNewItemsAllowed(true); + setNewItemsAllowed(false); } public ComboBox(String caption, Collection options) { super(caption, options); setMultiSelect(false); - setNewItemsAllowed(true); + setNewItemsAllowed(false); } public ComboBox(String caption, Container dataSource) { super(caption, dataSource); setMultiSelect(false); - setNewItemsAllowed(true); + setNewItemsAllowed(false); } public ComboBox(String caption) { super(caption); setMultiSelect(false); - setNewItemsAllowed(true); + setNewItemsAllowed(false); } public void setMultiSelect(boolean multiSelect) {