dynamic - Is calling doLayout() method a must after adding child to a parent? -
in our application, there tabpanel in adding/removing panel dynamically.
the panels added @ click of menu item following code in menu handler:
ext.getcmp('maintabpanelid').add(getpanel());
here getpanel()
method returns panel after creating it.
assuming id of main tab panel maintabpanelid
, of child panel panelid, in context, guide @ following:
- is necessary call
dolayout()
onmaintabpanel
after add method? - should
dolayout()
called onmaintabpane
l or on newly added child panel, is,ext.getcmp('maintabid').dolayout()
orext.getcmp('panelid').dolayout()
? - will call
dolayout()
take care of issues related rendering, scrollbars esp.? - the method
getpanel()
should return created panel (usingext.create
) or should return config object (havingxtype:'panel'
)? 1 should preferred better performance keeping time in mind?
<...> if container configured size-managing layout manager, container recalculate internal layout @ time too.
so don't have 1 — 3 because:
<...> framework uses internally refresh layouts form cases.
for defaults work, child items must added using {xtype: ......} not using ext.create("widget.type",{}) © roger.spall
so i'd prefer return configuration object instead of components itself.
Comments
Post a Comment