Gelmiş geçmiş en büyük porno sitemiz olan 2pe de her zaman en kaliteli pornoları sunmayı hedefledik. Diğer video sitemiz olan vuam da ise hd porno ağırlıklı çalışmalara başladık.

  1. #1
    Ext JS Premium Member
    Join Date
    Mar 2010
    Posts
    2
    Vote Rating
    0
    john.dowson is on a distinguished road

      0  

    Question Combo box store loading but not displaying data - strange behavior

    Combo box store loading but not displaying data - strange behavior


    Hi,

    I have a simple combo box that loads but does not display the data, but displays an empty box. I can even add data to the store in the load listener and the empty box will grow bigger, which seems to indicate that items are there (although not displayed and not selectable).
    I have used exactly the same code in other places and it works without a problem. Another weird thing is that if I go to the other pages where this code is also used first, then the combo box data is displayed when I return to this page. Code is:
    Code:
            var invoiceReportJsonReader = new Ext.data.JsonReader({
                                    totalProperty: 'totalCount',
                                    root: 'results',
                                    fields:
                                    [
                                        {name:'text'},
                                        {name:'value'}
                                    ]
            });
            var invoiceReportStore = new Ext.data.Store({
                                    proxy : new Ext.data.HttpProxy
                                        ({url : "<%= request.getContextPath()%>/prv/p/ItemsDropDownActionByUser.action", method:'GET'}),
                                    listeners: {load: function(store, records, options) {
                                                        console.log("Store loaded:" + records);
                                                        var actionsForHandlers = new Array();
                                                        actionsForHandlers['text'] = '1';
                                                        actionsForHandlers['value'] = 'DUMMY ADDED';
                                                        console.log("Store contains: " + this.getCount());
                                                        this.add(new Ext.data.Record(actionsForHandlers));
                                                        console.log("Now Store contains: " + this.getCount());
                                                },
                                                loadexception: function () {
                                                        console.log("Store loaded exception.");
                                                }},
                                    reader : invoiceReportJsonReader
            });
    
            var invoiceReportCombo = new Ext.form.ComboBox({
                                    store: invoiceReportStore,
                                    renderTo: 'rptInvoiceItemsSelectionDiv',
                                    valueField: 'text',
                                    id: 'invoiceReportComboId',
                                    hiddenId: 'itemsId',
                                    displayField:'value',
                                    typeAhead: true,
                                    autoWidth: true,
                                    mode: 'local',
                                    emptyText: '--- All ---'
            });
            invoiceReportStore.load();
    The Json returned by the action is ok (verified by printing out in the action), and the console log prints out messages as expected:

    Store loaded:[object Object],[object Object],[object Object],[object Object]
    Store contains: 4
    Now Store contains: 5

    Any ideas what the problem could be?

    Thanks in advance,

    John

  2. #2
    Ext JS Premium Member
    Join Date
    Mar 2010
    Posts
    2
    Vote Rating
    0
    john.dowson is on a distinguished road

      0  

    Default Cause found! No solution...

    Cause found! No solution...


    After further investigation, I have found that if I uncomment he following line, the comboo box works as expected:

    Code:
    new Ext.ToolTip({ target: 'help-reference-input', html: 'Reference Number input format: ABC123, ABC124, ABC125'});
    Why is this? Is there a way to have the tooltip and the combo box both working as expected?

    Note that it does not matter if the ToolTip is created before or after the combobox is loaded and displayed. All code is within an Ext.onReady function block.

    John