Results 1 to 6 of 6

Thread: How Combobox chain event

  1. #1
    Sencha User
    Join Date
    Nov 2011
    Posts
    17
    Answers
    1
    Vote Rating
    0
      0  

    Default Unanswered: How Combobox chain event

    I have a combobox, when the value change (select event) it will reload the store of other combobox, however the other combobox will always close by itself when you select the dropdown. This is certainly weird behavior of poor library created, I really wish i can use other product instead of ext js, however my boss decide to buy he because it is has relationship with your boss.

    var store6 = Ext.create('CQT.store.trading.StockSymbol2', { autoLoad: false });
    var store7 = Ext.create('CQT.store.trading.PriceList', { autoLoad: false });
    var store8 = Ext.create('CQT.store.trading.QuantityList', { autoLoad: false });

    ........................
    {
    id: 'selectedSymbol',
    name: 'selectedSymbol',
    xtype: 'combo',
    displayField:'Company_Code',
    hidden: false,
    mode: 'remote',
    emptyText: '(Input Symbol Here)',
    resizable: false,
    forceSelection:true,
    store: store6,
    pageSize: 6,
    autoLoad: false,
    minChars: 1,
    minListWidth: 320,
    autoSelect: true,
    enableKeyEvents: true,
    loadingText: "wait...",
    selectOnFocus: true,
    width:120,
    listeners: {
    loadexception: {
    fn: function (proxy, store, response, e) {
    Ext.MessageBox.alert(alert_lbl, "Fail Loading Symbol ");
    }, scope: this
    },
    select: function (combo, record, index) {
    var val = record[0].get("Company_Code");
    val = trim(val);
    this.setRawValue(val);
    formPanel.down('[name=txtSelectedSymbol]').setValue(val);
    currencyCombo.setValue('');
    txtPrice.setValue('');
    txtQuantity.setValue('');
    store7.load({ params : { cocode : val } });
    store8.load({ params : { cocode : val } });
    },
    blur : function() {
    var val = this.getRawValue();
    val = trim(val);
    this.setRawValue(val);
    formPanel.down('[name=txtSelectedSymbol]').setValue(val);
    CheckSymbol();
    },
    expand: function (combo) {
    var input = this.getRawValue();
    store6.removeAll();
    store6.load({ params: { start: combo.getParams().start, limit: combo.getParams().limit, query: input} });
    },
    keyup: function (txt, e) {
    var input = this.getRawValue();
    KeywordRegex = new RegExp(input, "i");
    },
    keypress: {
    buffer: 1,
    fn: function () {
    if (!this.getRawValue()) {
    this.doQuery('', true);
    }
    }
    }
    }
    }
    ........................

    var txtPrice = Ext.create('Ext.form.field.ComboBox', {
    id: 'txtPrice',
    name: 'txtPrice',
    xtype: 'combo',
    valueField:'PriceList',
    displayField:'PriceList',
    hidden: false,
    mode: 'remote',
    emptyText: '(Input Price Here)',
    resizable: false,
    forceSelection:true,
    store: store7,
    autoLoad: false,
    minChars: 1,
    minListWidth: 320,
    autoSelect: true,
    enableKeyEvents: true,
    loadingText: "wait...",
    selectOnFocus: true,
    width:100,
    listeners: {
    loadexception: {
    fn: function (proxy, store, response, e) {
    Ext.MessageBox.alert(alert_lbl, "Fail Loading Price");
    }, scope: this
    },
    select: function (combo, record, index) {
    var val = record[0].get("PriceList");
    val = trim(val);
    this.setRawValue(val);
    },
    blur : function() {
    var val = this.getRawValue();
    val = trim(val);
    this.setRawValue(val);
    },
    expand: function (combo) {
    var compcode = Ext.getCmp('selectedSymbol').getValue();
    var input = this.getRawValue();
    store7.load({ params: { cocode : compcode } });
    }
    }
    });

    Please help, and if you can't help please stop the development of your product and close your company, it is better to do that than making other developer life difficult.

  2. #2
    Ext JS Premium Member tvanzoelen's Avatar
    Join Date
    Apr 2008
    Location
    Groningen - Netherlands
    Posts
    1,146
    Answers
    87
    Vote Rating
    34
      0  

    Default

    use code tags plz and some formating would be great..

    Code:
    var store6 = Ext.create('CQT.store.trading.StockSymbol2', { autoLoad: false });
    var store7 = Ext.create('CQT.store.trading.PriceList', { autoLoad: false });
    var store8 = Ext.create('CQT.store.trading.QuantityList', { autoLoad: false });
    
    ........................
    {
    id: 'selectedSymbol',
    name: 'selectedSymbol',
    xtype: 'combo', 
    displayField:'Company_Code',
    hidden: false,
    mode: 'remote',
    emptyText: '(Input Symbol Here)', 
    resizable: false,
    forceSelection:true,
    store: store6,
    pageSize: 6,
    autoLoad: false,
    minChars: 1, 
    minListWidth: 320,
    autoSelect: true,
    enableKeyEvents: true,
    loadingText: "wait...",
    selectOnFocus: true,
    width:120, 
    listeners: {
    loadexception: {
    fn: function (proxy, store, response, e) {
    Ext.MessageBox.alert(alert_lbl, "Fail Loading Symbol ");
    }, scope: this
    },
    select: function (combo, record, index) { 
    var val = record[0].get("Company_Code");
    val = trim(val);
    this.setRawValue(val);
    formPanel.down('[name=txtSelectedSymbol]').setValue(val);
    currencyCombo.setValue('');
    txtPrice.setValue('');
    txtQuantity.setValue('');
    store7.load({ params : { cocode : val } });
    store8.load({ params : { cocode : val } });
    },
    blur : function() {
    var val = this.getRawValue();
    val = trim(val);
    this.setRawValue(val);
    formPanel.down('[name=txtSelectedSymbol]').setValue(val);
    CheckSymbol();
    },
    expand: function (combo) { 
    var input = this.getRawValue();
    store6.removeAll();
    store6.load({ params: { start: combo.getParams().start, limit: combo.getParams().limit, query: input} });
    },
    keyup: function (txt, e) {
    var input = this.getRawValue();
    KeywordRegex = new RegExp(input, "i");
    },
    keypress: {
    buffer: 1,
    fn: function () {
    if (!this.getRawValue()) {
    this.doQuery('', true);
    }
    }
    }
    }
    }
    ........................
    
    var txtPrice = Ext.create('Ext.form.field.ComboBox', {
    id: 'txtPrice',
    name: 'txtPrice',
    xtype: 'combo', 
    valueField:'PriceList', 
    displayField:'PriceList',
    hidden: false,
    mode: 'remote',
    emptyText: '(Input Price Here)', 
    resizable: false,
    forceSelection:true,
    store: store7,
    autoLoad: false,
    minChars: 1, 
    minListWidth: 320,
    autoSelect: true,
    enableKeyEvents: true,
    loadingText: "wait...",
    selectOnFocus: true,
    width:100, 
    listeners: {
    loadexception: {
    fn: function (proxy, store, response, e) {
    Ext.MessageBox.alert(alert_lbl, "Fail Loading Price");
    }, scope: this
    },
    select: function (combo, record, index) { 
    var val = record[0].get("PriceList");
    val = trim(val);
    this.setRawValue(val);
    },
    blur : function() {
    var val = this.getRawValue();
    val = trim(val);
    this.setRawValue(val);
    },
    expand: function (combo) { 
    var compcode = Ext.getCmp('selectedSymbol').getValue();
    var input = this.getRawValue();
    store7.load({ params: { cocode : compcode } });
    }
    } 
    });
    This is certainly weird behavior of poor library created, I really wish i can use other product instead of ext js, however my boss decide to buy he because it is has relationship with your boss.
    And plz tell us what kind of relationship they have.

  3. #3
    Sencha User
    Join Date
    Nov 2011
    Posts
    17
    Answers
    1
    Vote Rating
    0
      0  

    Default

    Please answer my question before asking what relationship they have.
    From the large amount of javascript libraries which is reliable, they choose ext js which is unreliable, buggy and worse of all, it has so many unanswered question in the forum, which the dev itself might not know the answer

  4. #4
    Ext JS Premium Member tvanzoelen's Avatar
    Join Date
    Apr 2008
    Location
    Groningen - Netherlands
    Posts
    1,146
    Answers
    87
    Vote Rating
    34
      0  

    Default

    But can you tell hat you mean by this?

    however the other combobox will always close by itself when you select the dropdown

  5. #5
    Sencha User
    Join Date
    Nov 2011
    Posts
    17
    Answers
    1
    Vote Rating
    0
      0  

    Default

    bump my thread up

  6. #6
    Ext JS Premium Member tvanzoelen's Avatar
    Join Date
    Apr 2008
    Location
    Groningen - Netherlands
    Posts
    1,146
    Answers
    87
    Vote Rating
    34
      0  

    Default

    You can bump this thread up yourself by marking the best answer.

Posting Permissions

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