1. #1
    Sencha User
    Join Date
    Feb 2012
    Location
    Noida,India
    Posts
    31
    Answers
    1
    Vote Rating
    1
    shruti_nair is on a distinguished road

      0  

    Default Unanswered: detail view of disclosure list not showing within tab panel

    Unanswered: detail view of disclosure list not showing within tab panel


    hi
    there is a disclosure list in my project on clicking the button anew view opens
    but the new view doesnt shows the tab panel

    i want the detail view to open inside the tab panel itself.

    list view
    Code:
    LoginForm.views.Receipts =  Ext.extend(Ext.Panel, {
        id:'Receipts',
        title:'Receipts',
        fullscreen: true,
        useToolbar:false,
        store:LoginForm.receipts_store,
       
        
        
        initComponent: function() 
        {
            var tplConstructor='{StoreName}';
            
            Ext.apply(this, 
            {
                dockedItems: 
                [{
                    xtype: "toolbar",
                    id:"receiptsToolbar",
                    title: "My Receipts",
                    items:[{ xtype:'button' ,ui:'normal' ,cls:'x-cameraButton',handler:this.onCameraClicked,scope:this },
                            {xtype:'spacer'},
                            { xtype:'button', ui:'normal',cls:'x-settingButton',handler:this.onSettings,scope:this}]
                    //items:cameraButton
                },
                {
                     xtype: "toolbar",
                    id:"searchToolbar",
                    items:[{
                            xtype:'searchfield',
                            id:'search',
                            placeHolder:'Search',
                            name:'toolbarSearchField',
                            listeners : {
                                    scope: this,
                                    
    
                                    keyup: function(field) 
                                    {
                                        console.log("inside keyup");
                                        LoginForm.music_store.load();
    
                                        var value = field.getValue();
    
                                        if (!value)
                                         {
                                            console.log("inside if block");
                                        LoginForm.music_store.filterBy(function() 
                                        {
                                        return true;
                                        });
                                        } 
                                        else 
                                        {
                                            var rootNode=LoginForm.music_store.getRootNode();
                                            var subStore=LoginForm.music_store.getSubStore(rootNode);
                                            this.findLeafStore(rootNode,subStore,value);
                                        }
                                            
                                    
                                    }
                                    }
                                    
    
                    }]
                }],
                items:[
                       {
                           xtype:'list',
                           
                           store:LoginForm.receipts_store,
                           itemTpl:'<div class="listimage"><div margin: 10px;width: 100px;border: 1px black solid;><img src="images/morrisons.jpg" align="left" class="img-div"style="width: 60px; height: 80px; padding: 10px;" ></div><h2 align="center">'+tplConstructor+'</h2></div>',
                           onItemDisclosure:function(){
                               LoginForm.views.viewport.reveal('receiptsDetailView');
                               
                           },
                       }]
                
            });
             LoginForm.views.Receipts.superclass.initComponent.apply(this, arguments);
        },
    
        
       
        onSearch:function(value)
        {
            console.log("inside leaf if");
            var searches = value.split(' '),
            regexps = [],
            i;
    
            for (i = 0; i < searches.length; i++) 
            {
                console.log("inside for loop");
                                                
                if (!searches[i]) return;
                regexps.push(new RegExp(searches[i], 'i'));
            }
    
                                                    
            console.log("inside filter by method");
            var matched = [];
            alert(record.get('text'));
    
            for (i = 0; i < regexps.length; i++) 
            {
                var search = regexps[i];
                alert(record.get('text'));
                if (record.get('text').match(search)) matched.push(true);
                else matched.push(false);
            };
    
            if (regexps.length > 1 && matched.indexOf(false) != -1) 
            {
                return false;
            } 
            else
            {
                return matched[0];
            }
                                                    
            
        },
        
        onCameraClicked:function()
        {
                                           
            Ext.dispatch({ controller: 'Users',action: 'cameraButtonClicked'});
                                           
        },
        onSettings:function()
        {
            Ext.dispatch({ controller: 'Users',action: 'settingButtonClicked'});
        },
        
        findLeafStore:function(rootNode,subStore,value)
        {
            subStore.filterBy(function(record) 
            {
                console.log("inside substore method");
                var recordIsLeaf=false;
                var leaf=record.get('leaf');
                if(Ext.isDefined(leaf) && leaf == false)
                {
                        console.log("inside if block");
                        onSearch(function(value)
        {
            console.log("inside leaf if");
            var searches = value.split(' '),
            regexps = [],
            i;
    
            for (i = 0; i < searches.length; i++) 
            {
                console.log("inside for loop");
                                                
                if (!searches[i]) return;
                regexps.push(new RegExp(searches[i], 'i'));
            }
    
                                                    
            console.log("inside filter by method");
            var matched = [];
            alert(record.get('text'));
    
            for (i = 0; i < regexps.length; i++) 
            {
                var search = regexps[i];
                alert(record.get('text'));
                if (record.get('text').match(search)) matched.push(true);
                else matched.push(false);
            };
    
            if (regexps.length > 1 && matched.indexOf(false) != -1) 
            {
                return false;
            } 
            else
            {
                return matched[0];
            }
                                                    
            
        });                        
                                                    
                                                    
                }
                else
                {
                    console.log("inside else block");
                    var subSubstore = LoginForm.music_store.getSubStore(record);
                    this.findLeafStore(rootNode,subSubstore,value);
                                                    
                }
            });
        }
        
    
    });
    Ext.reg('Receipts', LoginForm.views.Receipts);

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,801
    Answers
    3467
    Vote Rating
    834
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    What is the reveal method?
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Feb 2012
    Location
    Noida,India
    Posts
    31
    Answers
    1
    Vote Rating
    1
    shruti_nair is on a distinguished road

      0  

    Default


    its a method in viewport
    Code:
    LoginForm.views.Viewport = Ext.extend(Ext.Panel, {
        fullscreen: true,
        layout:'card',
    
        initComponent: function() {
            //alert("inside viewport");
            
            Ext.apply(this, {
                        
                   items: 
                   [
                                
                        { xtype: 'Login', id: 'Login'},
                        { xtype:'Home',id:'Home'},
                        { xtype:'CameraView',id:'CameraView'},
                        { xtype:'SettingView',id:'SettingView'},
                        { xtype:'receiptsDetailView',id:'receiptsDetailView'},
                        
                   ]
            });
            LoginForm.views.Viewport.superclass.initComponent.apply(this, arguments);
        },
        
        reveal:function(target)
        {        
            if(target=='Home')
            {      
                   this.setActiveItem(1);
            }
            else if(target=='CameraView')
            {
                this.setActiveItem(2);
            }
            else if(target=='SettingView')
            {
                   this.setActiveItem(3);
            }
            else
            {
                this.setActiveItem(4);
            }
        }
    
    });

Thread Participants: 1

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