Results 1 to 3 of 3

Thread: Combo box validator and Display value vs value

  1. #1
    Sencha User
    Join Date
    Apr 2011
    Posts
    96

    Default Combo box validator and Display value vs value

    I have a combo box

    Code:
    xtype:'combobox',
    name:'myExampleName',
    id:'myExampleId',
    displayField:'dips',
    valueField:'val',
    validator: function(value){
    console.log(value);
    }
    This outputs the displayField value NOT the value field value .

    If the name id of the object is "myExampleId" and I do this
    Code:
    var myTestObject= Ext.getCmp(myExampleId);
    console.log(myTestObject.getValue());
    I get the valueField value as expected.

    Can anyone explain why ? Validator seems to acting wrongly .

  2. #2
    Sencha User
    Join Date
    Apr 2011
    Posts
    96

    Default

    I still cannot seem to explain this .
    Anyone have a clue ?
    Am I using the validator incorrectly?

  3. #3
    Sencha User
    Join Date
    Jul 2008
    Posts
    5

    Default

    There must be a bug. I get the same behavior in extjs 3.4
    Documentation specifies that the validator function should give the value as parameter.

Posting Permissions

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