Extjs Viewport + TabPanel + form

2 respostas
P

Ola pessoal, continuo tentando entender o Extjs, bem tenho tentado colocar um form dentro de um tabpanel e depois pegar tudo e colocar dentro de um viewport, se eu colocar so o tabpanel ou somente o form dentro do viewport tudo funciona mas se tento juntar os tres da xabú.......

se alguma alma puder me ajudar eu fico agradecido por que ta sinistro aqui........

var form = new Ext.form.FormPanel({
                //baseCls: 'x-plain',
                //layout:'absolute',
                region: 'center',
                //url:'save-form.php',
                defaultType: 'textfield',

                items: [{
                    x: 0,
                    y: 5,
                    xtype:'label',
                    text: 'Send To:'
                },{
                    x: 60,
                    y: 0,
                    name: 'to',
                    anchor:'100%'  // anchor width by percentage
                },{
                    x: 0,
                    y: 35,
                    xtype:'label',
                    text: 'Subject:'
                },{
                    x: 60,
                    y: 30,
                    name: 'subject',
                    anchor: '100%'  // anchor width by percentage
                },{
                    x:0,
                    y: 60,
                    xtype: 'textarea',
                    name: 'msg',
                    anchor: '100% 100%'  // anchor width and height
                }]
            });

           var tabPanel = new Ext.TabPanel({
                        region:'center',
                        deferredRender:true,
                        autoScroll: true, 
                        margins:'0 3 3 0',
                        //activeTab:0,
                        items:[{
                                id:'tab1',
                                //contentEl:'tabs',
                                title: 'Criar Tags',
                                closable:false,
                                autoScroll:true,
                                items: form // form a ser renderizado
                              },{
                                id:'tab2',
                                //contentEl:'tabs',
                                title: 'Associar Tags',
                                closable:false,
                                autoScroll:true
                              }]
            });

            // Configure viewport
            viewport = new Ext.Viewport({
                   layout:'border',
                   items:tabPanel}); //[actionPanel,tabPanel]});

galera da uma força ai :p vluuuuuu

2 Respostas

A
Pedro Saavedra:
Ola pessoal, continuo tentando entender o Extjs, bem tenho tentado colocar um form dentro de um tabpanel e depois pegar tudo e colocar dentro de um viewport, se eu colocar so o tabpanel ou somente o form dentro do viewport tudo funciona mas se tento juntar os tres da xabú.......

se alguma alma puder me ajudar eu fico agradecido por que ta sinistro aqui........

var form = new Ext.form.FormPanel({
                //baseCls: 'x-plain',
                //layout:'absolute',
                region: 'center',
                //url:'save-form.php',
                defaultType: 'textfield',

                items: [{
                    x: 0,
                    y: 5,
                    xtype:'label',
                    text: 'Send To:'
                },{
                    x: 60,
                    y: 0,
                    name: 'to',
                    anchor:'100%'  // anchor width by percentage
                },{
                    x: 0,
                    y: 35,
                    xtype:'label',
                    text: 'Subject:'
                },{
                    x: 60,
                    y: 30,
                    name: 'subject',
                    anchor: '100%'  // anchor width by percentage
                },{
                    x:0,
                    y: 60,
                    xtype: 'textarea',
                    name: 'msg',
                    anchor: '100% 100%'  // anchor width and height
                }]
            });

           var tabPanel = new Ext.TabPanel({
                        region:'center',
                        deferredRender:true,
                        autoScroll: true, 
                        margins:'0 3 3 0',
                        //activeTab:0,
                        items:[{
                                id:'tab1',
                                //contentEl:'tabs',
                                title: 'Criar Tags',
                                closable:false,
                                autoScroll:true,
                                items: form // form a ser renderizado
                              },{
                                id:'tab2',
                                //contentEl:'tabs',
                                title: 'Associar Tags',
                                closable:false,
                                autoScroll:true
                              }]
            });

            // Configure viewport
            viewport = new Ext.Viewport({
                   layout:'border',
                   items:tabPanel}); //[actionPanel,tabPanel]});

galera da uma força ai :p vluuuuuu

Olá, como vai? Desculpe resgatar este post antigo, mas o que este jargão ViewPort significa?

marcos1EM

andredecotia veja:
http://dev.sencha.com/deploy/dev/docs/output/Ext.Viewport.html

Criado 17 de abril de 2008
Ultima resposta 17 de nov. de 2010
Respostas 2
Participantes 3