Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User
    Join Date
    Oct 2011
    Posts
    54
    Vote Rating
    0
    DarekKay is on a distinguished road

      0  

    Default ComboBox - TextField methods don't work

    ComboBox - TextField methods don't work


    Simple example:
    Code:
     public void onModuleLoad()
        {
            ModelKeyProvider<Stock> keyProvider = new ModelKeyProvider<Stock>()
            {
                @Override
                public String getKey(Stock item)
                {
                    return item.getKey();
                }
            };
    
            LabelProvider<Stock> labelProvider = new LabelProvider<Stock>()
            {
                @Override
                public String getLabel(Stock item)
                {
                    return item.getName();
                }
            };
    
            ListStore<Stock> store = new ListStore<Stock>(keyProvider);
            store.add(new Stock("key1", "name1"));
            store.add(new Stock("key2", "name2"));
            store.add(new Stock("key3", "xname3"));
    
            ComboBox<Stock> cb = new ComboBox<Stock>(store, labelProvider);
            cb.setTriggerAction(TriggerAction.ALL); 
            
            cb.setEditable(false); 
            cb.setForceSelection(true);
    
            RootLayoutPanel.get().add(cb);
        }
        
         class Stock
        {
    
            public Stock(String key, String name)
            {
                this.key = key;
                this.name = name;
            }
    
            String key = "";
            String name = "";
    
            public String getKey()
            {
                return key;
            }
    
            public void setKey(String key)
            {
                this.key = key;
            }
    
            public String getName()
            {
                return name;
            }
    
            public void setName(String name)
            {
                this.name = name;
            }
    
        }
    Both methods
    Code:
            cb.setEditable(false); 
            cb.setForceSelection(true);
    achieved the desired effect back in GXT2 - you couldn't type your own value and were forced to use a default one. This doesn't seem to work in GXT3 anymore.

  2. #2
    Sencha - GXT Dev Team
    Join Date
    Feb 2009
    Location
    Minnesota
    Posts
    2,643
    Vote Rating
    80
    Colin Alworth is just really nice Colin Alworth is just really nice Colin Alworth is just really nice Colin Alworth is just really nice Colin Alworth is just really nice

      0  

    Default


    TriggerField.setEditable fix is in SVN, though the setForceSelection issue is still unresolved. Thanks for the report.

Thread Participants: 1

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar