1. #131
    Sencha User
    Join Date
    Jul 2011
    Location
    San Francisco, CA
    Posts
    103
    Vote Rating
    5
    alicexyl is on a distinguished road

      0  

    Default


    kveeiv, thank you so much for this update, it's very helpful!

  2. #132
    Sencha User
    Join Date
    Feb 2011
    Posts
    63
    Vote Rating
    10
    maslofer will become famous soon enough

      0  

    Default


    There seems to be an issue with 4.1.1 RC2.

    When the boxselect is created with an initial selection value and you go to change the selected items, the popup menu no longer has the previously selected items selected. This only occurs the first time the boxselect is created. If you later change the selected items and then try to change the selection, the pop-up menu will show the right items.

    Works fine in 4.1.1 RC1

  3. #133
    Sencha Premium Member
    Join Date
    Mar 2008
    Posts
    92
    Vote Rating
    4
    kveeiv is on a distinguished road

      0  

    Default


    Thanks for the heads up, I'll be sure to keep an eye out for the GA release of 4.1.1 to address any issues that may arise once the final version hits.

  4. #134
    Sencha User
    Join Date
    Dec 2011
    Posts
    224
    Vote Rating
    9
    dedoz will become famous soon enough

      0  

    Default


    im using ext 4.1.0-rc2 (note not 4.1.1-rc2) and boxSelect 2.0.1

    i have a combo with a paged store, i have the config using a normal ext combo and this ux boxselect.
    problems to set a record as initial value.

    code is something like

    Ext.create('normal combo' or 'box select', {
    store : Ext.create('somePagedStore'),
    ... some other configs ......,
    value : record // this is a Ext.model / record instance
    });

    Using normal ext combo, the combo value is initialized correctly and displayed,
    using the same config with a boxSelect, the value is not displayed, seems like theres a problem setting a record as the initial value.

    this is the full code (note that code start loading a record, and then in the callback passing that record to the combo). If i change the comented line, to use a normal combox and comment the boxSelect line everything works perfectly.
    Code:
    MUI.model.empresaArea.load(1,{
        params : {
            scope : 'minimal',
            search : [['id',1,'=']],
        },    
        callback : function (record) {
            var boxStore = Ext.create('MUI.store.empresaArea',{ pageSize : 10});
            boxStore.getProxy().extraParams = { scope : 'minimal' , simpleSearchName : 'default' };
            
            
            //var box = Ext.create( 'Ext.form.field.ComboBox',{
            var box = Ext.create( 'Ext.ux.form.field.BoxSelect',{
                multiSelect : false,
                forceSelection: true,
                queryMode : 'remote',
                fieldLabel: 'Area',
                displayField: 'nom',
                valueField : 'id',
                width: 400,
                fieldLabel : 'Area',
                labelWidth : 100,
                name : 'empresaAreaId',
                value : record,
                store : boxStore,
                pageSize : 10,
                valueNotFoundText : 'Valor no encontrado'
            });
    
            var panel = Ext.create('Ext.form.Panel',{
                renderTo : Ext.getBody(),
                width : 600,
                height : 400,
                items : [box]
            });
        }
    });

  5. #135
    Sencha User
    Join Date
    Dec 2011
    Posts
    224
    Vote Rating
    9
    dedoz will become famous soon enough

      0  

    Default


    simplified the test case above, for this you dont need any other configured stores / models, this code is all the code needed to run the test case (do not click the trigger to open the list, the store is simplified so it doesnt have a configured proxy, because is not needed to test the problem)

    Code:
    var record,store;
    Ext.define('someModel',{ extend : 'Ext.data.Model', fields : ['id','label']});
    record = Ext.create('someModel',{id:1,label:'my Value'});
    store = Ext.create('Ext.data.Store',{model : 'someModel', pageSize: 10, autoLoad:false});
    
    var box = Ext.create( 'Ext.form.field.ComboBox',{
    //var box = Ext.create( 'Ext.ux.form.field.BoxSelect',{
        multiSelect : false,
        forceSelection: true,
        displayField: 'label',
        valueField : 'id',
        width : 400,
        value : record,
        store : store,
        pageSize : 10,
        renderTo : Ext.getBody()
    });
    using the ext combo will display "my Value' inside the combobox, as the initial value, using the boxSelect displays nothing

    btw, if you create the boxSelect, not passing the value (record) and then you use box.setValue(record) it will display the value correctly, the problem just happens when you give the value in the config while creating the boxSelect (value : record). and as this problem doesnt happens in the normal ext combo, well its a boxSelect problem :d

  6. #136
    Sencha Premium Member
    Join Date
    Mar 2008
    Posts
    92
    Vote Rating
    4
    kveeiv is on a distinguished road

      0  

    Default


    Can you reproduce this with 4.1? Versions before 4.1 are not supported, which would include any beta or RC releases leading up to 4.1.

  7. #137
    Ext JS Premium Member
    Join Date
    May 2010
    Location
    Wiesbaden
    Posts
    19
    Vote Rating
    0
    CSC-Germany is on a distinguished road

      0  

    Default


    Hi,

    I had the same issue with a remote store and the not displayed initial value. I debugged and found that the "getMultiSelectItemMarkup" function did'nt have the initial value in the internal valueStore.

    This is a possible fix:

    Code:
        setValue : function(value, doSelect, skipLoad) {
            var me = this, valueStore = me.valueStore, valueField = me.valueField, record, len, i, valueRecord, unknownValues = [];
    
    
            if (Ext.isEmpty(value)) {
                value = null;
            }
            if (Ext.isString(value) && me.multiSelect) {
                value = value.split(me.delimiter);
            }
            value = Ext.Array.from(value, true);
    
    
            for (i = 0, len = value.length; i < len; i++) {
                record = value[i];
                if (!record || !record.isModel) {
                    valueRecord = valueStore.findExact(valueField, record);
                    if (valueRecord >= 0) {
                        value[i] = valueStore.getAt(valueRecord);
                    }
                    else {
                        valueRecord = me.findRecord(valueField, record);
                        if (!valueRecord) {
                            if (me.forceSelection) {
                                unknownValues.push(record);
                            }
                            else {
                                valueRecord = {};
                                valueRecord[me.valueField] = record;
                                valueRecord[me.displayField] = record;
                                valueRecord = new me.valueStore.model(valueRecord);
                                me.valueStore.add(valueRecord); // BUGFIX: fixes the Problem with the initial value
                            }
                        }
                        if (valueRecord) {
                            value[i] = valueRecord;
                        }
                    }
                }
            }
    
    
            if ((skipLoad !== true) && (unknownValues.length > 0) && (me.queryMode === 'remote')) {
                var params = {};
                params[me.valueField] = unknownValues.join(me.delimiter);
                me.store.load({
                    params : params,
                    callback : function() {
                        if (me.itemList) {
                            me.itemList.unmask();
                        }
                        me.setValue(value, doSelect, true);
                        me.autoSize();
                    }
                });
                return false;
            }
    
    
            // For single-select boxes, use the last good (formal record) value if possible
            if (!me.multiSelect && (value.length > 0)) {
                for (i = value.length - 1; i >= 0; i--) {
                    if (value[i].isModel) {
                        value = value[i];
                        break;
                    }
                }
                if (Ext.isArray(value)) {
                    value = value[value.length - 1];
                }
            }
    
    
            return me.callParent([value,doSelect]);
        }

  8. #138
    Sencha User
    Join Date
    Mar 2010
    Posts
    4
    Vote Rating
    0
    ubong is on a distinguished road

      0  

    Default tks

    tks


    so good

  9. #139
    Sencha Premium Member
    Join Date
    Mar 2010
    Posts
    10
    Vote Rating
    0
    alonweiss is on a distinguished road

      0  

    Default Deselection bug

    Deselection bug


    With ComboBox, after deselecting an item, the 'select' event is fired (onListSelectionChange).
    However, in BoxSelect, after deselecting an item using the 'x' button, it doesn't (which is why i consider this a bug). If you deselect an item in the picker (like in ComboBox), the event fires properly.

    The BeforeDeselect event, however, fires properly.

    I'm looking into this, but it seems that perhaps some kind of a call to the base onListSelectionChange() function can do the trick.

  10. #140
    Sencha Premium Member
    Join Date
    Mar 2008
    Posts
    92
    Vote Rating
    4
    kveeiv is on a distinguished road

      0  

    Default


    With 4.1.1 GA out as of yesterday, I'll be verifying BoxSelect against this version and resolving any issues soon. I am out of town through the end of the weekend, so this will be early next week before I'm able to get to it. Just wanted to post a quick status update here so that people would know what to expect!

Thread Participants: 94

  1. scottw (1 Post)
  2. Dumbledore (1 Post)
  3. mysticav (2 Posts)
  4. JorisA (5 Posts)
  5. bobmanc (2 Posts)
  6. notjoshing (4 Posts)
  7. grgur (1 Post)
  8. ValterBorges (2 Posts)
  9. WebProgrammer (1 Post)
  10. Schlurcher (1 Post)
  11. zacware (2 Posts)
  12. ngd (8 Posts)
  13. radtad (2 Posts)
  14. zombeerose (13 Posts)
  15. nicholasnet (1 Post)
  16. themightychris (3 Posts)
  17. abraxxa (8 Posts)
  18. ttbgwt (1 Post)
  19. Psychokrameur (2 Posts)
  20. commanche (1 Post)
  21. ernst96 (2 Posts)
  22. omarc (1 Post)
  23. qooleot (1 Post)
  24. foxmarco (1 Post)
  25. christophe.geiser (1 Post)
  26. wki01 (1 Post)
  27. purnama (1 Post)
  28. mediacept (1 Post)
  29. bareflix (2 Posts)
  30. User 0815 (1 Post)
  31. yuuzai (1 Post)
  32. talha06 (1 Post)
  33. xjpmauricio (1 Post)
  34. scishop (2 Posts)
  35. Smalltalker (1 Post)
  36. hazimdikenli (2 Posts)
  37. raz0r1 (1 Post)
  38. McQuack_82 (1 Post)
  39. elilindner (1 Post)
  40. hexawing (1 Post)
  41. maneljn (3 Posts)
  42. Tim Toady (2 Posts)
  43. alonweiss (1 Post)
  44. ubong (1 Post)
  45. salarmehr (5 Posts)
  46. koblass (1 Post)
  47. Karthikeyan.rajmohan (2 Posts)
  48. Reimius (1 Post)
  49. CSC-Germany (1 Post)
  50. sankarbaluz (2 Posts)
  51. alaley (2 Posts)
  52. navvn (2 Posts)
  53. danCTS (2 Posts)
  54. bentoo42 (1 Post)
  55. jmaia (2 Posts)
  56. maslofer (1 Post)
  57. cadror (3 Posts)
  58. mrinsan (1 Post)
  59. yumaa (1 Post)
  60. rsqw (2 Posts)
  61. mahesh21688 (3 Posts)
  62. derditze (3 Posts)
  63. kunalshah6363 (1 Post)
  64. NatVik (1 Post)
  65. softwareguy (1 Post)
  66. alicexyl (7 Posts)
  67. under_dog (1 Post)
  68. tommytob (2 Posts)
  69. charlie17 (5 Posts)
  70. nathanrice (1 Post)
  71. srarnold (3 Posts)
  72. ettavolt (1 Post)
  73. qnens (1 Post)
  74. nikadod (3 Posts)
  75. PanchiKB (1 Post)
  76. Hooped (1 Post)
  77. dedoz (3 Posts)
  78. metas (1 Post)
  79. lindemann-medien (2 Posts)
  80. nathanmelis (1 Post)
  81. cyborat (1 Post)
  82. Forn (1 Post)
  83. gaurav.rehan (1 Post)
  84. Avman2119 (3 Posts)
  85. zzhouag (5 Posts)
  86. andreas-spindler (3 Posts)
  87. Alvaro L (1 Post)
  88. hown (1 Post)
  89. edson.hh (2 Posts)
  90. QuantumScripting (1 Post)
  91. chungns (1 Post)
  92. Delphine (1 Post)
  93. folivieri (1 Post)
  94. Lpsmash (1 Post)

Tags for this Thread