Results 1 to 3 of 3

Thread: Fill a Panel with another View

  1. #1
    Sencha Premium Member
    Join Date
    Feb 2012
    Location
    Mlheim an der Ruhr, Germany
    Posts
    82
    Answers
    5
    Vote Rating
    0
      0  

    Default Fill a Panel with another View

    Hello,

    I want to fill a tabPanel with another "ViewPort".
    In the TabPanel i need the regions north,center and west.

    TabPanel:
    Code:
              tab = Ext.create('Ext.panel.Panel', {
                itemId: tabId,
                title: nodeText,
                closable:true,
                items: [artikelGrid]
              });
              tabPanel.add(tab);
    Here my try.

    Code:
                                          var store_benutzer = Ext.create('Ext.data.Store', {
                                        
                                            fields:['user_name','rechte']
                                                ,
                                            proxy : {
                                                type:"ajax",
                                                url:"includes/benutzerdaten.php",
                                                waitMsg: 'Loading...',
                                                reader:{
                                                    type:"json"
                                                },
                                                writer: {
                                                type: 'json'
                                            }
                                            },
                                            autoLoad:true,
                                            autoSync: true
                                        
                                    });
    
                                var uebersicht = Ext.create ("Ext.grid.Panel" , {
                                     region: 'west',
                                     width : 200,
                                    title     : "Benutzerdaten",
                                    store     : store_benutzer,
                                    autoScroll : true,
                                        frame:true,
                                        columns:[
                                            {header:"Benutzername",dataIndex:"user_name"},
                                            {header:"Recht",dataIndex:"rechte"},
                                        ]
                        });
                        
                                var bearbeitung = Ext.create ("Ext.form.Panel" , {
                                     region: 'center',
                                     width : 200,
                                     url:"includes/benutzerdaten.php",
                                     layout: 'anchor',
                                     id: "autoid",
                                    title     : "Benutzerdaten bearbeiten",
                                
                                        items: [{
                                            xtype:"textfield",
                                            fieldLabel: 'First Name',
                                            name: 'first',
                                            allowBlank: false
                                        }],
                                            buttons: [{
                                                text: 'Reset',
                                                handler: function() {
                                                     var aid = Ext.getCmp ("autoid").getForm().reset();
                                                }
                                            }]
                        });
    
    
                        artikelGrid = Ext.create('Ext.container.Container', {
                            layout: 'border',
                        items: [uebersicht,bearbeitung]
    One of the items as center (uebersicht or bearbeitung) the browser shows, but both at same time in different regions and "nothing to see"

    Is this possible and who?

    Thx fpr response.

  2. #2
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,381
    Answers
    3997
    Vote Rating
    1536
      0  

    Default

    You should really do

    Code:
              tabPanel.add(artikelGrid);
    And skip the panel you have, of course giving artikelGrid a title.
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Frontend Engineer
    ________________
    Need any sort of Ext JS help? Modus Create is here to help!

    Check out my GitHub:
    https://github.com/mitchellsimoens

  3. #3
    Sencha Premium Member
    Join Date
    Feb 2012
    Location
    Mlheim an der Ruhr, Germany
    Posts
    82
    Answers
    5
    Vote Rating
    0
      0  

    Default

    Sorry I don't understand it. Can you please explain in more detail or give an Example.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •