Results 1 to 6 of 6

Thread: Why three level linkage combo can not success in FireFox

  1. #1
    Sencha User
    Join Date
    Jun 2011
    Posts
    25
    Vote Rating
    0
      0  

    Default Why three level linkage combo can not success in FireFox

    Hi,everyone.I write a three level linkage combo example.I can do it in IE9 and Chrome,but when I do it in FireFox,The third combo can not show content.I have found the json data in firebug,but I don't know why the content can not bind to combo.
    Code:
    function Sensor_Cable_Relation_Panel(objnum, objname, url, opr) {    Monitor_Cable_Token = 1;
        Monitor_Cable_DTSCombo_Url = '';
        Monitor_Cable_DTSChannelCombo_Url = '';
        Monitor_Cable_DTSSectionGrid_Url = '';
        var sectionlist = "";
        
        var cable_relation_panel = Ext.create('Ext.form.Panel', {
            id: 'cable-relatepanel',
            url: url,
            width: 400,
            height: 320,
            border: false,
            autoDestroy: true,
            defaults: {
                xtype: 'textfield',
                anchor: '98%',
                msgTarget: 'side',
                padding: 2,
                labelWidth: 120
            }, //WES_ComboClass
            items: [
                { hidden: true, allowBlank: true, fieldLabel: '??ID', name: 'Num', id: 'num-field' },
                { hidden: true, allowBlank: true, fieldLabel: '???ID', name: 'ObjNum', id: 'objnum-field', value: objnum },
                { hidden: false, xtype: 'displayfield', fieldLabel: '???', name: 'ObjName', id: 'objname-field', value: objname },
                { xtype: 'combo', fieldLabel: 'DTS??', id: 'dtstypeclass', valueField: 'DTSTypeID', displayField: 'DTSTypeName',
                    store: Ext.create('Ext.data.Store', {
                        autoLoad: true,
                        model: 'DTS_Type_ComboClass',
                        fields: ['DTSTypeID', 'DTSTypeName'],
                        proxy: {
                            type: 'ajax',
                            url: 'Config/Device/DTS.aspx?method=dtstype_combo',
                            reader: {
                                type: 'json',
                                root: 'data'
                            }
                        }
                    }),
                    triggerAction: 'all',
                    editable: false,
                    emptyText: "???DTS????",
                    listeners: {
                        'change': function (field, newvalue, oldvalue) {
                            if (newvalue != null || newvalue != "") {
                                if (!(opr == 'edit' && Monitor_Cable_Token == 1)) {
                                    //alert(Ext.getCmp('areaclass').getValue());
                                    Ext.getCmp('dtstypeid-field').setValue(Ext.getCmp('dtstypeclass').getValue().toString());
    
    
                                    Ext.getCmp('dtsclass').setRawValue("");
                                    Ext.getCmp('dtsid-field').setValue("");
                                    Monitor_Cable_DTSCombo_Url = 'Config/Config.aspx?method=dts_combo&dtstypeid=' + newvalue;
                                    Ext.getCmp('dtsclass').getStore().proxy.url = Monitor_Cable_DTSCombo_Url;
                                    Ext.getCmp('dtsclass').getStore().load();
    
    
                                    Ext.getCmp('dtschannelclass').setRawValue("");
                                    Ext.getCmp('dtschannelid-field').setValue("");
                                    Monitor_Cable_DTSChannelCombo_Url = '';
                                    Ext.getCmp('dtschannelclass').getStore().proxy.url = Monitor_Cable_DTSChannelCombo_Url;
                                    Ext.getCmp('dtschannelclass').getStore().load();
    
    
                                    Monitor_Cable_DTSSectionGrid_Url = '';
                                    Ext.getCmp('relate_section_grid').getStore().proxy.url = Monitor_Cable_DTSSectionGrid_Url;
                                    Ext.getCmp('relate_section_grid').getStore().load();
                                    sectionlist = "";
                                    Ext.getCmp('sectionlist-field').setValue(sectionlist);
                                }
                            }
                        }
                    }
                },
                { hidden: true, allowBlank: false, fieldLabel: 'DTS??ID', name: 'DTSTypeID', id: 'dtstypeid-field' },
                { xtype: 'combo', fieldLabel: 'DTS??', id: 'dtsclass', valueField: 'HostNum', displayField: 'HostName',
                    store: Ext.create('Ext.data.Store', {
                        autoLoad: false,
                        model: 'DTS_ComboClass',
                        fields: ['HostNum', 'HostName'],
                        proxy: {
                            type: 'ajax',
                            url: Monitor_Cable_DTSCombo_Url,
                            reader: {
                                type: 'json',
                                root: 'data'
                            }
                        }
                    }),
                    triggerAction: 'all',
                    editable: false,
                    emptyText: "???DTS??",
                    listeners: {
                        'change': function (field, newvalue, oldvalue) {
                            if (newvalue != null || newvalue != "") {
                                if (!(opr == 'edit' && Monitor_Cable_Token == 1)) {
                                    //alert(Ext.getCmp('areaclass').getValue());
                                    //alert("!!");
                                    Ext.getCmp('dtsid-field').setValue(Ext.getCmp('dtsclass').getValue().toString());
    
    
                                    Ext.getCmp('dtschannelclass').setRawValue("");
                                    Ext.getCmp('dtschannelid-field').setValue("");
                                    Monitor_Cable_DTSChannelCombo_Url = 'Config/Config.aspx?method=dts_channel_combo&hostnum=' + newvalue;
                                    Ext.getCmp('dtschannelclass').getStore().proxy.url = Monitor_Cable_DTSChannelCombo_Url;
                                    Ext.getCmp('dtschannelclass').getStore().load();
                                    //Ext.getCmp('dtschannelclass').select(1);
    
    
                                    Monitor_Cable_DTSSectionGrid_Url = '';
                                    Ext.getCmp('relate_section_grid').getStore().proxy.url = Monitor_Cable_DTSSectionGrid_Url;
                                    Ext.getCmp('relate_section_grid').getStore().load();
                                    sectionlist = "";
                                    Ext.getCmp('sectionlist-field').setValue(sectionlist);
                                }
                            }
                        }
                    }
                },
                { hidden: true, allowBlank: false, fieldLabel: 'DTSID', name: 'HostNum', id: 'dtsid-field' },
                { xtype: 'combo', fieldLabel: '????', id: 'dtschannelclass', valueField: 'ChannelNum', displayField: 'ChannelName',
                    store: Ext.create('Ext.data.Store', {
                        autoLoad: false,
                        model: 'DTS_Channel_ComboClass',
                        fields: ['ChannelNum', 'ChannelName'],
                        proxy: {
                            type: 'ajax',
                            url: Monitor_Cable_DTSChannelCombo_Url,
                            reader: {
                                type: 'json',
                                root: 'data'
                            }
                        }
                    }),
                    triggerAction: 'all',
                    editable: false,
                    emptyText: "?????",
                    listeners: {
    //                    'expand': function (field) {
    //                        alert(field.getStore().proxy.url);
    //                        //field.getStore().load();
    //                    },
                        'change': function (field, newvalue, oldvalue) {
                            if (newvalue != null || newvalue != "") {
                                if (!(opr == 'edit' && Monitor_Cable_Token == 1)) {
                                    //alert(Ext.getCmp('areaclass').getValue());
                                    ///alert("!!!");
                                    Ext.getCmp('dtschannelid-field').setValue(Ext.getCmp('dtschannelclass').getValue());
    
    
                                    Monitor_Cable_DTSSectionGrid_Url = 'Config/Config.aspx?method=dts_section_list&channelnum=' + newvalue + '&objnum=' + objnum;
                                    Ext.getCmp('relate_section_grid').getStore().proxy.url = Monitor_Cable_DTSSectionGrid_Url;
                                    Ext.getCmp('relate_section_grid').getStore().load({
                                        scope: this,
                                        callback: function (records, operation, success) {
                                            sectionlist = "";
                                            Ext.getCmp('sectionlist-field').setValue(sectionlist);
                                        }
                                    });
                                }
                            }
                        }
                    }
                },
                { hidden: true, allowBlank: false, fieldLabel: '??ID', name: 'ChannelNum', id: 'dtschannelid-field' },
                { hidden: true, allowBlank: false, fieldLabel: '????', name: 'SectionList', id: 'sectionlist-field' },
                {
                    xtype: 'grid', title: '???????', width: 300, height: 200, id: 'relate_section_grid',
                    store: Ext.create('Ext.data.Store', {
                        model: 'dts-segment-model',
                        proxy: {
                            type: 'ajax',
                            url: Monitor_Cable_DTSSectionGrid_Url,
                            reader: {
                                type: 'json',
                                root: 'data'
                            }
                        },
                        autoLoad: false
                    }),
                    columns: [
                        { text: '????', dataIndex: 'SectionNum', sortable: false, hidden: true, width: 30 },
                        { text: '????', dataIndex: 'ChannelNum', sortable: false, hidden: true, width: 30 },
                        { text: '????', dataIndex: 'SectionName', sortable: false, hidden: false, flex: 1 },
                        { text: '????', dataIndex: 'BegPos', sortable: false, hidden: false, flex: 1 },
                    //{ text: '????', dataIndex: 'EndPos', sortable: false, hidden: true, width: 55, renderer: bypasstoken },
                        {text: '????', dataIndex: 'EndPos', sortable: false, hidden: true, flex: 1 }
                    ],
                    selModel: Ext.create('Ext.selection.CheckboxModel', {
                        listeners: {
                            selectionchange: function (sm, selections) {
                                //Ext.getCmp('relate_raster_grid').setDisabled(selections.length == 0);
                                if (!(opr == 'edit' && Monitor_Cable_Token == 1)) {
                                    sectionlist = "";
                                    //alert("!!!!");
                                    if (selections.length != 0) {
                                        for (var i = 0; i < selections.length; i++) {
                                            if (i != selections.length - 1)
                                                sectionlist = sectionlist + selections[i].get('SectionNum') + ",";
                                            else
                                                sectionlist = sectionlist + selections[i].get('SectionNum');
                                        }
                                    }
                                    Ext.getCmp('sectionlist-field').setValue(sectionlist);
                                }
                            }
                        }
                    })
                }
            ]
        });
    
    
        return cable_relation_panel;
    }

  2. #2
    Sencha User kevin.chen's Avatar
    Join Date
    Sep 2012
    Location
    Redwood City, CA
    Posts
    242
    Answers
    12
    Vote Rating
    6
      0  

    Default

    I saw your store configuration include both model and fields, does your returned data follow fields definition or model definition

  3. #3
    Sencha User
    Join Date
    Jun 2011
    Posts
    25
    Vote Rating
    0
      0  

    Default

    Yes,I do check the post and response,the data and form of json are both right.There is not error.Is there something wrong I ignore?

  4. #4
    Sencha User kevin.chen's Avatar
    Join Date
    Sep 2012
    Location
    Redwood City, CA
    Posts
    242
    Answers
    12
    Vote Rating
    6
      0  

    Default

    usually, when you configure a store, if you use model property, you don't need to use fields property, if you use fields, you don't need model, can you remove one of them?

  5. #5
    Sencha User
    Join Date
    Jun 2011
    Posts
    25
    Vote Rating
    0
      0  

    Default

    I don't think so.I use it perfectly on IE9 and chrome.When I move model or field the data can not show in any way.

  6. #6
    Sencha User kevin.chen's Avatar
    Join Date
    Sep 2012
    Location
    Redwood City, CA
    Posts
    242
    Answers
    12
    Vote Rating
    6
      0  

    Default

    I think you should work on the new issue after you remove the field or model

Tags for this Thread

Posting Permissions

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