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
    Sencha User Rocco's Avatar
    Join Date
    Nov 2007
    Location
    Phoenix, AZ
    Posts
    31
    Vote Rating
    0
    Rocco is on a distinguished road

      0  

    Default [2.1svn2134] empty ComboBox.getValue() returns emptyText in SVN build

    [2.1svn2134] empty ComboBox.getValue() returns emptyText in SVN build


    It appears that the changes made in SVN revision 2134 to Ext.form.Field are causing an empty ComboBox's value to be set to the emptyText value. I didn't look too much into the code that seems to have caused this, but I believe it's a change made to the afterRender method.

    Here's some simple code to reproduce the bahavior I'm experiencing, although I'm sure it could be duplicated using any example with a TextField (or any component derived from Field) that has the emptyText property defined.

    Code:
    Ext.onReady(function(){
    Ext.QuickTips.init(); 
     
    var combo = new Ext.form.ComboBox({
     id: 'testCombo',
     emptyText: 'Select One...',
     typeAhead: true,
     triggerAction: 'all',
     mode: 'local',
     store: new Ext.data.SimpleStore({
         fields: [
             {name: 'id'},
             {name: 'name'}
         ],
         data : [
             [1, 'Chevrolet'],
             [2, 'Volkswagen'],
             [3, 'Honda'],
             [4, 'Ford']
         ],
         sortInfo: {field: 'name', direction: 'ASC'}
     }),
     displayField: 'name',
     valueField: 'id',
     forceSelection: true,
     allowBlank: false,
     renderTo: document.body
    });
     
     
    var button = new Ext.Button({
     text: 'Get Value',
     renderTo: document.body,
     handler: function() {
         Ext.MessageBox.show({
             title: 'Hello!',
             msg: 'The value of the combobox is \'' + Ext.getCmp('testCombo').getValue() + '\'',
             icon: Ext.MessageBox.INFO,
             buttons: Ext.MessageBox.OK,
             animEl: 'testCombo'
         });
     }
    });
     
    });
    Running the above with the SVN build, both Ext.getCmp('testCombo').value and Ext.getCmp('testCombo').getValue() return 'Select One...'. The same in Ext 2.1 returns ''.

    Please let me know if you need more info or if I can be of help.

    -Rocco

  2. #2
    Ext User nassaja-rus's Avatar
    Join Date
    Mar 2007
    Location
    Russia
    Posts
    314
    Vote Rating
    1
    nassaja-rus is on a distinguished road

      0  

    Default


    Code:
    Ext.override( Ext.form.ComboBox, 	{
    		       setValue : function(v){
    		        var text = v;
    		        if(this.valueField){
    		            var r = this.findRecord(this.valueField, v);
    		            if(r){
    		                text = r.data[this.displayField];
    		            }else if(this.valueNotFoundText !== undefined){
    		                text = this.valueNotFoundText;
    		            }
    		        }
    		        this.lastSelectionText = text;
    		        if(this.hiddenField && v != this.emptyText){
    		            this.hiddenField.value = v;
    		        }
    		        Ext.form.ComboBox.superclass.setValue.call(this, text);
    		        this.value = v;
    		    }		    
    		});
    Last edited by mystix; 9 Jun 2008 at 2:16 AM. Reason: use [code][/code] tags
    -= miu-miu =-

    Linux, Perl, GNU, Open Source, Ajax, Ubuntu 9.04

  3. #3
    Ext User
    Join Date
    Mar 2008
    Posts
    79
    Vote Rating
    0
    JoomlaMan is on a distinguished road

      0  

    Default doesnt work.

    doesnt work.


    Code doesn't work as posted either before or after multiple comboboxes are created. If the solution is only for an application which uses one combobox, can it please be extended for n comboboxes?

  4. #4
    Sencha User
    Join Date
    Jul 2011
    Posts
    8
    Vote Rating
    0
    parkcity is on a distinguished road

      0  

    Default Combobox.getValue() returns null

    Combobox.getValue() returns null


    Does any body has a solution to the following problem?

    I have combobox on a panel with following combobox code:

    {
    xtype: 'combobox',
    name : 'batchgroup',
    fieldLabel: 'Batch Group',
    id: 'batchgroup',
    store: 'dp.Abc',
    queryMode: 'local',
    displayField: 'name',
    valueField: 'abbr',
    //forceSelection : true,
    editable: false,
    autoSelect: true,
    emptyText: "<Select Value>",
    columnWidth: .5

    }
    -----------------
    Later in the code when i try to get the value using the following code, I get a null value even after a user selects
    a value in the above combobx

    var batchgroup = Ext.getCmp('batchgroup');

    console.log('batchgroup value... '+batchgroup.getValue());

    Here the batchgroup.getValue() so retrieved is null