Pergunta

Here my code in sencha. im having a 4 tabs When click button action in any tab content the new view as has been added in tab bar dynamically.here my code

var wishlist = {
            standardSubmit : false,
            items: [
                    {
                    xtype: 'fieldset',
                    scope:this,
                    defaults: {
                    required: true,
                    labelAlign: 'left',
                    },
                    title: 'hom',
                    items: [                              
                            {
                            xtype: 'textfield',
                            name : 'password',
                            label: 'Category',
                            useClearIcon: true
                            },{
                            xtype: 'textfield',
                            name : 'password',
                            label: 'Location',
                            useClearIcon: true
                            }],
                     },
                     {
                             xtype:  'button',
                             text:   'Add Wish',
                             ui:     'confirm',
                             handler: function()
                             {
                            //Here when i click other view has been added in tab bar
                            view.setActiveItem(0, {type:'fade', direction:'left'});
                            view.setActiveItem({
                                       title: 'Add Wish',
                                       items: [wishlist]
                                       });

                     });
                      },
                    }]
            };

Tab bar integeration code here

  var view = Ext.create('Ext.TabPanel', {
                       fullscreen: false,
                       tabBarPosition: 'bottom',
                       items: [{
                               title: 'HOME',
                               iconCls: 'home',
                               items: [{
                                       xtype: 'toolbar',
                                       title: 'My Items',
                                       },wishlist]

                               },
                               {
                               title: 'ITEMS',
                               iconCls: 'star',
                               items: [{
                                       xtype: 'toolbar',
                                       title: 'Add Items',
                                       },signinformBase]
                               },
                               {
                               title: 'PROFILE',
                               iconCls: 'user',
                               items: [{
                                       xtype: 'toolbar',
                                       title: 'MY PROFILE',
                                       },wishlist]
                               },{
                               title: 'FRIENDS',
                               iconCls: 'team',
                               items: [{
                                       xtype: 'toolbar',
                                       title: 'FRIENDS',
                                       },wishlist]
                               },

                       });

Please help me to sort out

Foi útil?

Solução

You need to start with sencha docs and start building some simple application.

Learn Sencha Class System

In sencha framework folder there is a examples folder you can find many examples there, use that to start leaning and experiment with it.

Then, You need to know some more specific concepts like Store and MVC Pattern

If you are not familiar with MVC then

MVC in Depth Part 1

MVC in Depth Part 2

Useful SO link

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top