-
20 Aug 2010 6:25 AM #1
Load another page with TabPanel
Load another page with TabPanel
With this code, I load html code for each item, but I want to load a new Panel or news elements and not only html. How do I do ?PHP Code:app.Messages = new Ext.TabPanel({
cls: 'cards',
tabBar: {
dock: 'bottom',
ui: 'light',
layout: {
pack: 'center'
}
},
ui: 'light',
animation: {
type: 'slide',
cover: true
},
defaults: {
scroll: 'vertical',
},
items: [{
title: 'About',
html: '<p>eeee</p>',
iconCls: 'info',
cls: 'card'
},
{
title: 'Favorites',
html: 'Favorites Card',
iconCls: 'favorites',
cls: 'card',
}],
})
My Twitter : http://twitter.com/_RomainRichard
My Web Site: http://www.romain-richard.fr/
French developer (so my english might not be perfect)
-
20 Aug 2010 10:03 PM #2
Use the items configuration, let's say you want to a carousel as a tab item:
Code:new Ext.TabPanel({ fullscreen: true, items: [{ xtype: 'carousel', items: [{ html: 'First item' },{ html: 'Second item' }] }] });Evan Trimboli
Sencha Developer
Twitter - @evantrimboli
Don't be afraid of the source code!
-
23 Aug 2010 12:02 AM #3
But I want to add several items in a tabBar
I try this :
I want 2 page in my Tabbar with inside each list.PHP Code:var liste1 = new Ext.List({
title: 'About',
iconCls: 'info',
cls: 'card',
data:[
{name:'mike', age:34},
{name:'jack', age:12}
]
});
var liste2 = new Ext.List({
title: 'Test',
iconCls: 'info',
cls: 'card',
data:[
{name:'paul', age:23},
{name:'john', age:24}
]
});
app.Messages = new Ext.TabPanel({
cls: 'cards',
tabBar: {
dock: 'bottom',
ui: 'light',
layout: {
pack: 'center'
}
},
ui: 'light',
animation: {
type: 'slide',
cover: true
},
defaults: {
scroll: 'vertical',
},
items: [{
xtype: 'list',
items:[liste1,liste2]
}]
})
(sorry for my english, I'm french)My Twitter : http://twitter.com/_RomainRichard
My Web Site: http://www.romain-richard.fr/
French developer (so my english might not be perfect)
-
23 Aug 2010 12:08 AM #4
Code:new Ext.TabPanel({ items: [{ title: 'List 1', xtype: 'list', // .... },{ title: 'List 2', xtype: 'list', // .... }] });Evan Trimboli
Sencha Developer
Twitter - @evantrimboli
Don't be afraid of the source code!
-
23 Aug 2010 12:14 AM #5
I try this, I see tabBar but I cant see lists :
PHP Code:app.Messages = new Ext.TabPanel({
cls: 'cards',
tabBar: {
dock: 'bottom',
ui: 'light',
layout: {
pack: 'center'
}
},
ui: 'light',
animation: {
type: 'slide',
cover: true
},
defaults: {
scroll: 'vertical',
},
items: [{
xtype: 'list',
title: 'Test',
iconCls: 'info',
cls: 'card',
data:[
{name:'paul', age:23},
{name:'john', age:24}
]
},{
xtype: 'list',
title: 'About',
iconCls: 'info',
cls: 'card',
data:[
{name:'mike', age:34},
{name:'jack', age:12}
]
}]
});
My Twitter : http://twitter.com/_RomainRichard
My Web Site: http://www.romain-richard.fr/
French developer (so my english might not be perfect)
-
23 Aug 2010 12:15 AM #6
Because you haven't specified a template, or an itemSelector for either list.
Evan Trimboli
Sencha Developer
Twitter - @evantrimboli
Don't be afraid of the source code!
-
23 Aug 2010 12:22 AM #7
Thanks you it's work.
My Twitter : http://twitter.com/_RomainRichard
My Web Site: http://www.romain-richard.fr/
French developer (so my english might not be perfect)
-
23 Aug 2010 1:09 AM #8
And if I want to load my lists dynamically with Ext.util.JSONP.request, I dont find public event to execute this.
My Twitter : http://twitter.com/_RomainRichard
My Web Site: http://www.romain-richard.fr/
French developer (so my english might not be perfect)
-
23 Aug 2010 1:14 AM #9
The store has a loadData method or you can use a store with a scripttag proxy.
Evan Trimboli
Sencha Developer
Twitter - @evantrimboli
Don't be afraid of the source code!
-
23 Aug 2010 4:13 AM #10
And last question, I dont see how I cant load another page when I select an element in my list.
My Twitter : http://twitter.com/_RomainRichard
My Web Site: http://www.romain-richard.fr/
French developer (so my english might not be perfect)
Similar Threads
-
Tabpanel load IFRAME page
By yugikhoi in forum Ext 3.x: Help & DiscussionReplies: 0Last Post: 30 Jul 2010, 9:12 PM -
How to load a page into a tabpanel
By rookie007 in forum Ext 3.x: Help & DiscussionReplies: 8Last Post: 25 Sep 2009, 12:47 AM -
Ext js Tabpanel only works for page load need to call it inside a js function to load
By sanath_ko in forum Ext 2.x: Help & DiscussionReplies: 10Last Post: 11 Mar 2009, 12:54 AM -
How can I load aspx page on TabPanel?
By lemonee in forum Ext 2.x: Help & DiscussionReplies: 4Last Post: 5 Aug 2008, 6:09 AM -
TabPanel load another Ext page
By bkraut in forum Ext 2.x: Help & DiscussionReplies: 2Last Post: 20 Nov 2007, 10:41 AM


Reply With Quote