Hybrid View

    Looks like we can't reproduce the issue or there's a problem in the test case provided.
  1. #1
    Sencha Premium Member
    Join Date
    Mar 2012
    Posts
    78
    Vote Rating
    1
    kmanuel@entausa.com is on a distinguished road

      0  

    Question Switch between elements on combobox change

    Switch between elements on combobox change


    I have a combobox with static values (0,1,2). For '2', I want to switch between 2 sets of components to display. The first set I have the DateTime field from here. The second is just a textfield. I want to do this in a generic method that doesn't reference the objects by an ID or assume there's (n) components available. For structure, do I include all components, just hidden:true then show()/hide() on my change listener? Also, when I try to query name!= I get what I was NOT looking for. See below.


    Code:
        cbo.addListener('change', function () {
            var fs = this.up('fieldset'); //works
            var dates = fs.query('datefield'); //works
            var cbos = fs.query('combo[name!='+cbo.name+']'); //Gives me my original combo???
        });

  2. #2
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    8,927
    Vote Rating
    443
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


    You may have to override add this operation, as I do not believe this operation is support.

    The other option is to assign an itemId to each and then exclude that one from the list when querying for others.

    Scott.

  3. #3
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,520
    Vote Rating
    375
    jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future

      0  

    Default


    You say that != operator doesn't work and you get the wrong combo(s) ?
    Jozef Sakalos, aka Saki

    Education, extensions and services for developers at new http://extjs.eu
    News: Grid Search Plugin, ExtJS 5 Complex Data Binding using MVVM


  4. #4
    Sencha Premium Member
    Join Date
    Mar 2012
    Posts
    78
    Vote Rating
    1
    kmanuel@entausa.com is on a distinguished road

      0  

    Default


    Quote Originally Posted by jsakalos View Post
    You say that != operator doesn't work and you get the wrong combo(s) ?
    Yes. These two return exactly the same thing:

    Code:
    console.log(fs.query('combo[name=TransDateOption]')[0] == fs.query('combo[name!=TransDateOption]')[0]);
    true

  5. #5
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,520
    Vote Rating
    375
    jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future

      0  

    Default


    If wrapping the name "TransDateOption" in double quotes doesn't help then it is a bug. Prepare please a simple showcase, I can move this thread to bugs then.
    Jozef Sakalos, aka Saki

    Education, extensions and services for developers at new http://extjs.eu
    News: Grid Search Plugin, ExtJS 5 Complex Data Binding using MVVM


  6. #6
    Sencha Premium Member
    Join Date
    Mar 2012
    Posts
    78
    Vote Rating
    1
    kmanuel@entausa.com is on a distinguished road

      0  

    Default


    I used the Ext4.1 example contact form. In the window buttons, I changed the 'cancel' button handler to the below. All 6 queries returned 1 for length and the field name was 'firstName'.

    Code:
    handler: function() {
            var form = this.up('form');
            var arr = [
                form.query('textfield[name=firstName]')
                ,form.query('textfield[name!=firstName]')
                ,form.query('textfield[name="firstName"]')
                ,form.query('textfield[name!="firstName"]')
                ,form.query("textfield[name='firstName']")
                ,form.query("textfield[name!='firstName']")
            ];
            
            Ext.each(arr,function(a) {
                if (a.length > 0)
                    console.log(a.length,a[0].name);
            });
            
            this.up('form').getForm().reset();
            this.up('window').hide();
    }

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi