-
17 Dec 2012 11:04 AM #11
That's an overnest in a layoutless panel.Code:var tab = main_tab.add({ items: [{ xtype: content }] })
Read your code carefully.
You are adding to "main_tab" a Panel with no configuration except that it has one child: a component of xtype: content.
That Panel will not lay out its children!
The API documentation hammers this message into the reader!Search the forum: http://www.google.com/coop/cse?cx=01...%3Az7of1ufqccu
Read the docs too: http://extjs.com/deploy/dev/docs/
Scope: http://extjs.com/forum/showthread.ph...642#post257642
-
17 Dec 2012 11:05 AM #12
Likewise your region: 'center'.
How are you hoping that it lays out its children?
Does it need children?Search the forum: http://www.google.com/coop/cse?cx=01...%3Az7of1ufqccu
Read the docs too: http://extjs.com/deploy/dev/docs/
Scope: http://extjs.com/forum/showthread.ph...642#post257642
-
17 Dec 2012 12:28 PM #13
Hello Animal,
thanks for your reply and pointing me towards nearer to the solution.
I have changed my code like this:
The code of the center region i have changed like this:PHP Code:var tab = main_tab.add({
xtype: content,
helpId: prg_helpId
});
Is this right?PHP Code:{
region : 'center',
autoScroll : true,
itemId : 'center_id',
id : 'center_id',
xtype : 'tabpanel',
items : [
{
title : 'Information',
itemId : 'home'
}
}
The second tab is still not shown and the console throws
"Uncaught TypeError: Cannot read property 'childNodes' of null"
when changing to the second tab.
How to add a title, tools and so on to the tabpanel, this issue caused me in overnesting layouts!
Thanks in advance.
Michi
-
18 Dec 2012 12:37 AM #14
If you need the panel header (and title/tools) inside the tab of a tab panel, then you could do this:
Code:{ xtype: 'tabpanel', items: [{ xtype: 'panel', title: 'Tab Text', layout: 'fit', // important :) items: [{ title: 'Titlebar in the Tab', tools: ... }] }] }Don Griffin
Ext JS Development Team Lead
Check the docs. Learn how to (properly) report a framework issue and a Sencha Cmd issue
"Use the source, Luke!"
-
18 Dec 2012 4:35 AM #15
Hello,
what is the content from this bug "EXTJSIV-8037"? Can you short explain?
I working on my app and remove all overnesting layouts!
Thanks!
Michi
-
18 Dec 2012 4:26 PM #16
I opened the ticket because this looks/looked like it may be a regression. It may yet be, but the removal of over-nesting is always a "Good Thing" so I would highly recommend you proceed

As you see, the "over" part can be a question at times. There are cases where nesting is necessary. In those cases, you may just need to specify the layout (typically "fit" if you have a single child item). If you don't specify a layout config, you get the "auto" layout which does not manage the size of the child items in any way. It does react to their "auto size" but that can be confusing to understand the "auto size" of a bunch of child components. Often this is not what you want, but could be.
If the nesting is intentional, I would also highly recommend a comment stating the reasons (such as "need panel header/tools inside the tab") or something so the next person to maintain the code does not "fix" the problem by removing the nesting.
I would also suggestion adding "layout: 'auto'" to any place where that is specifically what you want, again because it often looks like a mistake when you don't specify the layout.
While one could argue this more broadly (I mean, there are other config properties that have default values), over-nesting and unintentional use of "auto" layout are very common mistakes.Don Griffin
Ext JS Development Team Lead
Check the docs. Learn how to (properly) report a framework issue and a Sencha Cmd issue
"Use the source, Luke!"
-
18 Dec 2012 10:34 PM #17
Hello,
thanks for your explanation! I will take your advise / hints and rework my whole application with removing all over-nesting layouts.
After removing the layouts in my example, which was the cause of this thread, now i got this error with 4.2.0 beta:
The console throws "Uncaught TypeError: Cannot read property 'childNodes' of null"
when changing to the second tab.
Any Idea?
Thanks for your support!
Michi
-
19 Dec 2012 12:50 AM #18
I would stop on that error in the debugger (Chrome or Firefox/Firebug make this easy) and see if you can tell from the callstack what is attempting to happen. If you cannot figure it out, posting the callstack here may help others understand the situation.
Don Griffin
Ext JS Development Team Lead
Check the docs. Learn how to (properly) report a framework issue and a Sencha Cmd issue
"Use the source, Luke!"
-
19 Dec 2012 9:05 PM #19
Hello,
i have founded the piece of code which makes problems:
The modell:
The Store:PHP Code:Ext.define('AM.model.nav.system_update',
{
extend : 'Ext.data.Model',
fields : [
{
name : 'id',
type : 'int'
},
{
name : 'prg_version'
},
{
name : 'prg_time_real',
type : 'date',
dateFormat : 'Y-m-d H:i:s'
},
{
name : 'prg_time_year',
convert : function(value, record) {
prg_time_year = record.data.prg_time_real.getFullYear();
return prg_time_year;
}
},
{
name : 'prg_kategorie'
},
{
name : 'prg_text'
},
{
name : 'prg_document_path'
}
],
idProperty : 'id'
});
The store has the groupField 'prg_time_year' which is in the modell defined like this:PHP Code:Ext.define('AM.store.nav.system_update',
{
extend : 'Ext.data.Store',
model : 'AM.model.nav.system_update',
autoLoad : true,
groupDir : 'DESC',
groupField : 'prg_time_year',
proxy :
{
type : 'ajax',
url : 'prg/system_updateverlauf/system_updateverlauf_db.php',
reader :
{
root : 'data',
totalProperty : 'count',
id : 'id'
}
}
});
In the grid i use this feature:PHP Code:{
name : 'prg_time_year',
convert : function(value, record) {
prg_time_year = record.data.prg_time_real.getFullYear();
return prg_time_year;
}
},
The grid columns are shown (after removing all overnested layoutsPHP Code:features : [
{
ftype : 'groupingsummary',
groupHeaderTpl : '{name}',
startCollapsed : true,
enableGroupingMenu : false
}
],
), but wihtout data.
When using this feature i got an error 'Uncaught TypeError: Cannot read property 'childNodes' of null' - whithout everything works fine in 4.2.0 beta (without grouping)!
Thanks!
Michi
You found a bug! We've classified it as
EXTJSIV-8037
.
We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.


Reply With Quote