1. #1
    Sencha User
    Join Date
    Jan 2013
    Posts
    13
    Vote Rating
    0
    jitesh_biswal is on a distinguished road

      0  

    Default Unanswered: Combo store returning previous store values

    Unanswered: Combo store returning previous store values


    I am loading combo B store by the action of another combo A select. I can see the combo B store loads in the server log files however the combo B shows only new drop down data not the display value. when i am try to set the display value of combo B using below code, its showing previous selected value. When i am checking firebug the store.data.items are showing updated value but with below code, i am getting previous value. Any help is appreciated


    changeAssignmentStatusSelect: function ( combo, records, eOpts ) {
    var com=Ext.ComponentQuery.query('combo[id=assignmentSubStatusComboId]');
    var mynewstore=com[0].getStore();
    mynewstore.reload();
    var b=mynewstore.getAt(2);
    var a=mynewstore.data.items;
    //alert(b);

    var iValues = [];
    for (i = 0; i < a.length; i++) {
    var post = mynewstore.getAt(i).get('DISPLAY_VALUE');
    iValues.push ( post );
    }
    com[0].setValue(iValues); //

    }

  2. #2
    Touch Premium Member
    Join Date
    Jun 2011
    Posts
    1,084
    Answers
    112
    Vote Rating
    95
    Farish is a glorious beacon of light Farish is a glorious beacon of light Farish is a glorious beacon of light Farish is a glorious beacon of light Farish is a glorious beacon of light

      0  

    Default


    It could be because of caching. try setting queryCaching: false on your 2nd combobox:

    http://docs.sencha.com/ext-js/4-1/#!...g-queryCaching

  3. #3
    Sencha User
    Join Date
    Jan 2013
    Posts
    13
    Vote Rating
    0
    jitesh_biswal is on a distinguished road

      0  

    Default made queryCaching change still not working

    made queryCaching change still not working


    {text:
    "Sub Status",width: 200,sortable: true, dataIndex: 'occupancySubStatus',queryCaching: false,editor: new Ext.form.field.ComboBox({id: 'assignmentSubStatusComboId',editable:false, displayField: 'DISPLAY_VALUE', store: Ext.create('SspReview.store.SspReviewAssignmentSubStatusStore', {})})
    },
    Added queryCaching :false , but i am getting same result as previous. Any more suggestions ?

  4. #4
    Touch Premium Member
    Join Date
    Jun 2011
    Posts
    1,084
    Answers
    112
    Vote Rating
    95
    Farish is a glorious beacon of light Farish is a glorious beacon of light Farish is a glorious beacon of light Farish is a glorious beacon of light Farish is a glorious beacon of light

      0  

    Default


    the queryCaching has to be used inside the combobox. I think you have placed it in a grid column. Try moving it to the combobox used as the editor for that grid column.

  5. #5
    Sencha User
    Join Date
    Jan 2013
    Posts
    13
    Vote Rating
    0
    jitesh_biswal is on a distinguished road

      0  

    Default still same previous value in display filed of the combo box b

    still same previous value in display filed of the combo box b


    i have moved the queryCaching:false to editor section. Now my code looks like below , however the display value on change of combox box A, still displaying previous result. One other thing i observered is that if i hard code the display field of combo B as ' Select Below' , its showing as expected. Only value from store is not showing as expected

    {text:
    "Sub Status",width: 200,sortable: true, dataIndex: 'occupancySubStatus', editor: new Ext.form.field.ComboBox({id: 'assignmentSubStatusComboId',editable:false, queryCaching: false,displayField: 'DISPLAY_VALUE', store: Ext.create('SspReview.store.SspReviewAssignmentSubStatusStore', {})})
    },

    ---------------------------------------------------------------------------------------------------------------------------
    changeAssignmentStatusSelect:
    function ( combo, records, eOpts ) {var com=Ext.ComponentQuery.query('combo[id=assignmentSubStatusComboId]');var mynewstore=com[0].getStore(); mynewstore.reload(); var b=mynewstore.getAt(0);var a=mynewstore.data.items;//alert(b);
    var iValues = []; for (i = 0; i < a.length; i++) {var post = mynewstore.getAt(i).get('DISPLAY_VALUE'); iValues.push ( post ); }com[0].setValue('Please Select'); //
    },

  6. #6
    Sencha User
    Join Date
    Jan 2013
    Posts
    13
    Vote Rating
    0
    jitesh_biswal is on a distinguished road

      0  

    Default


    I solved the problem by below code. This seems to be an workaround but didn't find the solution for original problem

    myStore.load({params: {param:
    'AssignmentSubStatus',subParam: colname
    },callback:
    function(records, operation, success) {var comboDisplayField="Please Select";if(records.length == 1) {var onlyRecord=records[0];var comboDisplayField=onlyRecord.data.DISPLAY_VALUE; } elseif (records.length == 0) {comboDisplayField="";}var com=Ext.ComponentQuery.query('combo[id=assignmentSubStatusComboId]');com[0].setValue(comboDisplayField);
    },

Thread Participants: 1

Tags for this Thread

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi