1. #1
    Sencha Premium Member
    Join Date
    Mar 2013
    Posts
    8
    Vote Rating
    0
    sonia.bonvicin is on a distinguished road

      0  

    Default Unanswered: Too many values after button click to get tab panel with navigation view

    Unanswered: Too many values after button click to get tab panel with navigation view


    I have a problem with the visualization of my navigationView.
    This is what the code produces:
    visualizzazione.png
    ..and this is what I want to do:
    visualizzazione_voluta.jpg
    My code is done as follows:
    Code:
    Ext.define('MyApp.view.EntiAbilitati', {    extend: 'Ext.Panel',
    
        config: {        id: 'EntiAbilitati',        layout: {            type: 'vbox'        },        items: [            {                xtype: 'button',                itemId: 'EntraVideate',                text: 'Entra'            }        ],        listeners: [            {                fn: 'onEntraVideateTap',                event: 'tap',                delegate: '#EntraVideate'            }        ]    },    onEntraVideateTap: function(button, e, eOpts) {        var me = this;        Ext.getStore('Ospiti').load({            callback: function(record,options,success){		                if(success){                      me.removeAll();                     me.add(Ext.create(                    'MyApp.view.Videate',{                        layout: {                            type: 'fit'                        }                    }                    )                    );                   }            }        });    } });


    And this is the code of my Tab Panel with the navigationView:

    Code:
    Ext.define('MyApp.view.Videate', {    extend: 'Ext.tab.Panel',
    
        config: {        activeItem: 1,        id: 'Videate',        items: [            {                xtype: 'container',                id: 'Ospiti',                layout: {                    type: 'vbox'                },                items: [                    {                        xtype: 'formpanel',                        height: 80,                        items: [                            {                                xtype: 'searchfield',                                id: 'ricercaUtenti',                                label: 'Cerca ospite:',                                name: 'ricercaUtenti'                            }                        ]                    },                    {                        xtype: 'panel',                        flex: 1,                        layout: {                            type: 'vbox'                        },                        items: [                            {                                xtype: 'navigationview',                                flex: 1,                                id: 'listaUtenti1',                                defaultBackButtonText: 'Indietro',                                items: [                                    {                                        xtype: 'list',                                        title: 'Lista utenti',                                        itemId: 'mylist',                                        hideOnMaskTap: false,                                        itemTpl: [                                            '<div>{NOMEOSPITE}</div>'                                        ],                                        indexBar: {                                            width: 50                                        }                                    }                                ]                            }                        ]                    }                ]            },            {                xtype: 'container',                title: 'Nuovo',                layout: {                    type: 'vbox'                },                items: [                    {                        xtype: 'panel',                        flex: 1,                        layout: {                            type: 'vbox'                        },                        items: [                            {                                xtype: 'selectfield',                                id: 'newLuogoNascita',                                itemId: 'LUOGONASCITA',                                label: 'luogo di nascita',                                name: 'LUOGONASCITA',                                options: [                                    {                                        text: ' ',                                        value: ' '                                    },                                    {                                        text: 'Trento',                                        value: 'Trento'                                    },                                    {                                        text: 'Rovereto',                                        value: 'Rovereto'                                    }                                ]                            },                            {                                xtype: 'textfield',                                id: 'newCodFisc',                                itemId: 'CODFISC',                                label: 'CF',                                name: 'CODFISC'                            }                        ]                    }                ]            }        ],        listeners: [            {                fn: 'onMylistSelect',                event: 'select',                delegate: '#mylist'            },            {                fn: 'onInserisciOspiteTap',                event: 'tap',                delegate: '#mybutton2'            }        ]    },    onMylistSelect: function(dataview, record, eOpts) {        console.log(record.data);        Ext.getCmp('listaUtenti').push({            title: record.data.NOMEOSPITE,            layout:'fit',            items: [            Ext.create('MyApp.view.datiOspite',{                record: record               })            ]        });    } });


    What am I doing wrong? Is the CSS?
    Any help wuold be appreciated! Thanx!
    You can find the full code into the attachment.
    test_tabpanel.zip

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    35,669
    Answers
    3354
    Vote Rating
    746
    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


    I'm not too sure what you mean by "too many values", also the formatting of your code makes it illegible.
    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 Premium Member
    Join Date
    Feb 2012
    Location
    Berne, Switzerland
    Posts
    698
    Answers
    41
    Vote Rating
    40
    ingo.hefti has a spectacular aura about ingo.hefti has a spectacular aura about ingo.hefti has a spectacular aura about

      1  

    Default


    Out of curiosity I downloaded your code and opened it in my IDE. And, I hate to say it, but this is a mess. Apparently this was done in Architect by a Sencha newbie. (please forgive me my harsh words - nothing personal!!) And it is a very good example what happens when you start with Sencha without having some knowledge about its structure. Unfortunately using Architect does not help producing good code (despite what marketing may say), when you don't know what and, more importantly, how you should be doing things. (Just a side note: my first encounter with Sencha Touch was also through Architect - but I quickly abandoned because its not dummy proof ... )

    I took the freedom to refactor your project (at least part of it) and do it my way (and this is, of course, not the only way to do such things!). Just unzip and throw it into your web directory and let it go (f.e. /localhost/testpanel2/). Feel free to ask back if you need some more information.
    https://dl.dropbox.com/u/8085058/dev/TestPanel2.zip

  4. #4
    Sencha Premium Member
    Join Date
    Mar 2013
    Posts
    8
    Vote Rating
    0
    sonia.bonvicin is on a distinguished road

      0  

    Default


    No problem man, I'm working with Sencha since 2 weeks Yes, I'm a newbie
    Thakyou for your advice!
    I solved the problem in another way, setting the tabpanel layout: card and the navigationView as vbox.

    PS: sorry mitchellsimoens for my code, but this is a problem of the forum code editor (or maybe because I ctrl+c and ctrl+v from the code tabs of my previous post..)

Thread Participants: 2

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar