Results 1 to 2 of 2

Thread: Combo box store loading but not displaying data - strange behavior

  1. #1
    Ext JS Premium Member
    Join Date
    Mar 2010
    Vote Rating

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


    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:
            var invoiceReportJsonReader = new{
                                    totalProperty: 'totalCount',
                                    root: 'results',
            var invoiceReportStore = new{
                                    proxy : new
                                        ({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());
                                                        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',
                                    typeAhead: true,
                                    autoWidth: true,
                                    mode: 'local',
                                    emptyText: '--- All ---'
    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,


  2. #2
    Ext JS Premium Member
    Join Date
    Mar 2010
    Vote Rating

    Default Cause found! No solution...

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

    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.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts