1. #1
    Sencha User
    Join Date
    Feb 2011
    Posts
    12
    Vote Rating
    0
    jbrooksuk is on a distinguished road

      0  

    Default Re-rendering ".add"ed components

    Re-rendering ".add"ed components


    Hey,

    Currently I'm adding a new card to a Panel by using:
    Code:
    c = nestedContacts.add({
                        		height: 150,
        						width: 300,
    	                        itemId: id,
    	                        html: rec.get('phone'),
    	                        dockedItems: [{
    	                            xtype: 'toolbar',
    	                            dock: 'top',
    	                            items: [{
    	                                text: 'Back',
    	                                ui: 'back',
    	                                handler: function() {
    	                                    nestedContacts.setActiveItem(0, { type: 'slide', reverse: true });
    	                                }
    	                            }]
    	                        }]
    	                    });
    However once it's added, the parent item (a floating panel) moves, but once the List item is clicked and rendered, the behaviour does not occur anymore.

    How can I force the layout as soon as the components are added?

    I've tried:
    Code:
    added: function() {
           		// c.doLayout();
           		// c.doComponentLayout();
    }
    But I get errors. (without comments of course)

    James

  2. #2
    Sencha User
    Join Date
    Feb 2011
    Posts
    12
    Vote Rating
    0
    jbrooksuk is on a distinguished road

      0  

    Default


    Fixed.

    I basically create a new Panel inside of its parent and add:
    Code:
    renderTo: nestedContacts.el.dom.childNodes[0].id
    Works a treat.

Similar Threads

  1. Replies: 1
    Last Post: 12 Jul 2010, 7:19 AM
  2. Replies: 3
    Last Post: 28 Oct 2009, 6:38 AM
  3. replace the "south" with the "new Ext.StatusBar" in "layout:'border'"
    By ealpha in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 18 May 2008, 8:28 PM

Tags for this Thread

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