PDA

View Full Version : panel applyTo config



chrisbrianolsen
21 Feb 2011, 7:51 AM
There seems to be an issue with the applyTo config item. From what I can tell it is expecting the specified id to also be a component. It is also not in the v4 docs, is it deprecated? If so how are you guys handling having a header with some markup specified in the .html and extjs managing the document flow?

Thanks
-- Chris

Animal
21 Feb 2011, 4:32 PM
A Header is a first class Component.

If you need the Header to contain anything special, you could create it a a separate Component, and add it:



var myHeader = new Ext.Component/Ext.panel.Header({
dock: 'top',
...
});


And in the Panel:



dockedItems: myHeader

chrisbrianolsen
22 Feb 2011, 7:48 AM
Looking for some help with a design pattern on how to handle a banner.
The docked header would work for the layout I think, I am using a border layout right now.
What I have in the banner is a sliding doors css pattern and a bunch of links and text.
All simple markup that seems like it should be in the html not in the javascript.
I have tried hardcoding the html in a variable in the js and using the html: config.
That works but is horrible to read and maintain.
Could async. load it also, but that seems wasteful to make additional requests when I already have the index.html.

Thanks for any thoughts
-- Chris