Quantcast
Channel: SmartClient Forums
Viewing all articles
Browse latest Browse all 4756

Picklist issue with ComboBoxItem when addUnknownValues property is set to false...

$
0
0
Using SmartGWT 4.0Pro 04/28/2014 build.

There seems to be a problem with picklist filtering when addUnknownValues property is set to false.

Code:

package com.mycompany.client;

import com.google.gwt.core.client.EntryPoint;
import com.smartgwt.client.widgets.form.DynamicForm;
import com.smartgwt.client.widgets.form.fields.ComboBoxItem;
 
public class ComboBoxStyledSample implements EntryPoint { 
 
    public void onModuleLoad() { 
 
        final DynamicForm form = new DynamicForm(); 
        form.setWidth(250); 
 
        ComboBoxItem cbItem = new ComboBoxItem(); 
        cbItem.setTitle("Select"); 
        cbItem.setType("comboBox"); 
        cbItem.setAddUnknownValues(false);
        cbItem.setValueMap("Cat", "Cow", "Dog", "Donkey", "Giraffe", "Goat", "Marmoset", "Macaw", "Monkey", "Moose", "Mouse", "Quail", "Rabbit"); 
 
        form.setFields(cbItem); 
        form.draw(); 
    } 
}

In the above sample code, when user types in "Ma" and then backspaces to change the text to "Mo", it is expected the picklist will be filtered to display Monkey, Moose and Mouse. Instead, the picklist disappears and no options are displayed.

The above code works fine with addUnknownValues set to true.

Viewing all articles
Browse latest Browse all 4756

Trending Articles