NNKL.COM
welcome to my space
X
Search:  
 HOME   ComboBox forceSelection:false not working
ComboBox forceSelection:false not working
Published by: rose 2009-01-08
Welcome to:nnkl.com

  • I have a combobox that is populated by a store but I would also like the ability to enter arbritary text. From the docs, forceSelection:false should do the trick, but it does not work. If I type a number in the combobox, when the form is submitted, no data is sent.
    If I pick a number from the combobox, when the form is submitted, data is sent.


    new Ext.form.ComboBox({
    fieldLabel: 'Phone',
    Ext.form.SelectBox (Make a ComboBox work behave like an HTML SELECT ::
    false, forceSelection: true, rowHeight: false, lastSearchTerm: Heres my code thats not working (from above SelectBox Demo.htm): Ext.onReady(function
    http://extjs.com/forum/showthread.php?p=98733
    HOME
    hiddenName:'phone',
    id:'cbo_phone',
    store: store_phone,
    valueField:'number',
    displayField:'number',
    typeAhead: true,
    mode: 'local',
    triggerAction: 'all',
    forceSelection:false,
    emptyText:'Select a number...',
    selectOnFocus:true,
    width:190
    })

  • Ext: Help [Archive] - Page 52 - Ext JS Forums::
    combobox selection when editable == false [SOLVED] GridEditor ignores forceSelection=false column width is not working. Combobox Filtering (local)
    http://extjs.com/forum/archive/index.php/f-9-p-52.html
    HOME
    ComboBox::
    (boolean forceSelection) used to determine what nodes this DataView will be working with. activate (defaults to 4, does not apply if editable = false)
    http://gwt-ext.com/docs/2.0.3/com/gwtext/client/widgets/form/ComboBox.html
    HOME

  • That fixed the problem. Thank you!


  • According to what I have read on the forums and documentation sites, the following should let me have a dropdown that I can enter numbers into, have it provide me with a list of options to select, yet allow me to enter a partial number.

    For example, a set of tail numbers would be:
    01-23456
    01-23457
    01-23458

    I want to have the dropdown allow me to enter "01-2" so I can populate a grid with tail numbers that are a partial match. Unfortunately, the combo box will select the first complete match and select that, despite the forceSelection:false. I'm new to Ext, so go easy on me http://extjs.com/forum/images/icons/icon10.gif

    new Ext.form.ComboBox({
    name:'tail_number',
    grow:true,
    shadow:false,
    fieldLabel: '* Tail number',
    store: jsonTailNumbersAC,
    minChars:1,
    mode:'local',
    displayField:'tail_number',
    typeAhead: false,
    triggerAction:'all',
    hideTrigger: false,
    forceSelection:false,
    emptyText:'Enter tail number',
    width:250,
    listeners: {
    "select" : {
    fn:
    function () {
    dsn = Ext.StoreMgr.get("jsonTailNumbersAC");
    document.submitSearch(this.getValue());
    document.loadConfigDatasources(this.getValue());

    dsn.clearFilter();
    }
    ,
    dummy: true
    }
    }
    })


  • This kind of behavior is already supported by Combobox.

    Replace triggerAction 'all' with 'query' and remove the select event handler.


  • Remove hiddenName and valueField and add name:'phone'





  • I Am a Sinner – What About You?
    Global Sourcing and Supplier Online by Dylan

    You are looking at:nnkl.com's ComboBox forceSelection:false not working, click nnkl.com to home
     
     Homepage | Add to favorites | Contact us | Exchange links | LOGIN | Site map | 
    Copyright© 2008 nnkl.com        Site made:CFZ