1. #1
    Sencha User
    Join Date
    Nov 2011
    Posts
    3
    Vote Rating
    0
    peruchox is on a distinguished road

      0  

    Default Unanswered: TabPanel not scrolling to the end of the content.

    Unanswered: TabPanel not scrolling to the end of the content.


    Hello,

    I have a simple List where after you click on an item a tab panel with two items shows the record's detail. I separate the detail info in 2 items in the panel. Recipe and preparation.

    When I run the web app and click the first record, everything works as expected but when I return to the list and selected another record, the 2nd item(panel) in the tabpanel does not let the user scroll all the way down.
    Can you please help me with this scrolling issue?

    here are some part of my code.


    Code:
    RecipeDemo.TabPanel = new Ext.TabPanel({
    fullscreen: true,
    layout:'fit',
      listeners: {
          'deactivate': function(panel) { panel.destroy(); }
        },
    scroll: 'vertical',
                items: [{
                    title: 'Recipe',
    				scroll: 'vertical',
                    html: 'Loading...',
    					height:'100%',
                    cls: 'card1'
                }, {
                    title: 'Preparation',
    				scroll: 'vertical',
                    html: 'Loading...',
    			
                    cls: 'card2'
                }]
    });
    
    RecipeDemo.detailToolbar = new Ext.Toolbar({
    id:'detailToolbar',
    items:[{
    text:'back',
    ui:'back',
    handler:function(){
    RecipeDemo.Viewport.setActiveItem('listwrapper')
    }
    
    
    }]
    
    
    });
    
    
    RecipeDemo.detailPanel = new Ext.Panel({
    id:'detailPanel',
    scroll:'vertical',
    dockedItems: [RecipeDemo.detailToolbar,RecipeDemo.TabPanel],
    tpl:'hello'
    
    
    });
    
    //This is the list panel
    
    
    RecipeDemo.listPanel = new Ext.List({
    id:'RecipeIndex',
    store:RecipeDemo.ListStore,
    grouped:true,
    itemTpl:'<div class="Recetas" id="{id}">{text}</div>',
    onItemDisclosure: function(record){
    Ext.Ajax.request({
    beforerequest: function(){
    Ext.get('spinner').show();},
    requestcomplete:function(){
    Ext.get('spinner').hide();},
                    url: 'js/parser.php',
    				params: {id: record.get('id')},
    				method:'POST',
    				success: function(response) {
    				
    				var sdata = response.responseText;
    				sdata = sdata.split("|");
    				var recipe = sdata[0] + "</br></br></br></br></br></br>Fuente: 'yanuq.com'";
    				 prep = sdata[1].trim();
    				prep = prep.replace(/\.(?=[A-Z])/g, '<br />')
    				    RecipeDemo.TabPanel.getComponent(0).update(recipe);
    				    RecipeDemo.TabPanel.getComponent(1).update(prep);
    				    RecipeDemo.Viewport.setActiveItem('detailPanel');
    			        RecipeDemo.TabPanel.setActiveItem(0);
    
    
    				   //alert(response.responseText);
                    },
                    failure: function() {
                        //RecipeDemo.detailPanel.update("Loading failed.");
    					RecipeDemo.TabPanel.getComponent(0).update("loading failed")
    					
                    }
                });
    			
    //RecipeDemo.detailPanel.update();
    RecipeDemo.detailToolbar.setTitle(record.get('text'));
    }
    
    
    
    
    });

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,525
    Vote Rating
    871
    Answers
    3564
    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


    Are you using update()?
    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
    Nov 2011
    Posts
    3
    Vote Rating
    0
    peruchox is on a distinguished road

      0  

    Default


    Yes. OnItemDisclosure of the list I'm updating the panel items.
    [CODE]

    onItemDisclosure: function(record){
    Ext.Ajax.request({ 'more code here

    RecipeDemo.TabPanel.getComponent(0).update(recipe); //updates data panel1 recipe RecipeDemo.TabPanel.getComponent(1).update(prep);// updates data panel2 RecipeDemo.Viewport.setActiveItem('detailPanel'); //change panel RecipeDemo.TabPanel.setActiveItem(0); // select panel1.

    So like I said the web app works at first time but when I select the record again or another record the datat updates but the scroll does not work.

    thanks.

Thread Participants: 1