DuGi
13 Jun 2007, 8:26 AM
Hey guys (& girls?),
First of all, I'm very new to extjs - first time I'm ever using it. So, I'm dont know EVERYTHING about extjs obviously.
Well here's my problem. I'm trying to make a webmail for my IMAP account. So to list my e-mails I'm using the grid-function. But since I have 300+ mails, I would like to my a paging toolbar. So, I tried the example in the documentation (Paging and remote datasets).
When I load my page. It doesn't split the 300 records up in page. Or actually it does, but it shows EVERY e-mail - 300+ - on every page.
So here is my question. How does the paging toolbar actually work. Does it send some parameters to url given in HttpProxy, so I then in my php-script can only print x-records?
I mean, I print every 300+ e-mails in JSON-format at once, but I thought that the paging toolbar would split it up? Or is that my job, and the paging toolbar just handles the viewing and switching between pages?
Forgive me, If I sound very stupid - but hey, I have to learn it somewhere, right? :)
Here is my code:
[CODE]
var ds = new Ext.data.Store({
proxy: new Ext.data.HttpProxy({
url: domain+'scripts/mailbox/inbox/list/'
}),
reader: new Ext.data.JsonReader({
root : 'mails',
totalProperty : 'totalCount',
id : 'inbox'
}, [/*{
name : 'priority',
mapping : 'priority'
}, {
name : 'status',
mapping : 'status'
}, */{
name : 'subject',
mapping : 'subject'
}, {
name : 'from',
mapping : 'from'
}, {
name : 'date',
mapping : 'udate'
}, {
name : 'size',
mapping : 'size'
}
]),
remoteSort: true
});
var cm = new Ext.grid.ColumnModel([{
header : '<img src="'+domain+'/images/icons/bullet_blue.png" style="width: 16px; height: 16px; cursor: help;" title="Priotet" alt="Priotet"/>',
dataIndex : 'priority',
width : 25
},{
header : '<img src="'+domain+'/images/icons/email.png" style="width: 16px; height: 16px; cursor: help;" title="Status" alt="Status"/>',
dataIndex : 'status',
width : 25
},{
id : 'messsages-head-subject',
header : 'Emne',
dataIndex : 'subject',
sortable : true
},{
header : 'Afsender',
dataIndex : 'from',
width : 250,
sortable : true
},{
header : 'Dato / Klokken',
dataIndex : 'date',
width : 175,
sortable : true
},{
header : 'St
First of all, I'm very new to extjs - first time I'm ever using it. So, I'm dont know EVERYTHING about extjs obviously.
Well here's my problem. I'm trying to make a webmail for my IMAP account. So to list my e-mails I'm using the grid-function. But since I have 300+ mails, I would like to my a paging toolbar. So, I tried the example in the documentation (Paging and remote datasets).
When I load my page. It doesn't split the 300 records up in page. Or actually it does, but it shows EVERY e-mail - 300+ - on every page.
So here is my question. How does the paging toolbar actually work. Does it send some parameters to url given in HttpProxy, so I then in my php-script can only print x-records?
I mean, I print every 300+ e-mails in JSON-format at once, but I thought that the paging toolbar would split it up? Or is that my job, and the paging toolbar just handles the viewing and switching between pages?
Forgive me, If I sound very stupid - but hey, I have to learn it somewhere, right? :)
Here is my code:
[CODE]
var ds = new Ext.data.Store({
proxy: new Ext.data.HttpProxy({
url: domain+'scripts/mailbox/inbox/list/'
}),
reader: new Ext.data.JsonReader({
root : 'mails',
totalProperty : 'totalCount',
id : 'inbox'
}, [/*{
name : 'priority',
mapping : 'priority'
}, {
name : 'status',
mapping : 'status'
}, */{
name : 'subject',
mapping : 'subject'
}, {
name : 'from',
mapping : 'from'
}, {
name : 'date',
mapping : 'udate'
}, {
name : 'size',
mapping : 'size'
}
]),
remoteSort: true
});
var cm = new Ext.grid.ColumnModel([{
header : '<img src="'+domain+'/images/icons/bullet_blue.png" style="width: 16px; height: 16px; cursor: help;" title="Priotet" alt="Priotet"/>',
dataIndex : 'priority',
width : 25
},{
header : '<img src="'+domain+'/images/icons/email.png" style="width: 16px; height: 16px; cursor: help;" title="Status" alt="Status"/>',
dataIndex : 'status',
width : 25
},{
id : 'messsages-head-subject',
header : 'Emne',
dataIndex : 'subject',
sortable : true
},{
header : 'Afsender',
dataIndex : 'from',
width : 250,
sortable : true
},{
header : 'Dato / Klokken',
dataIndex : 'date',
width : 175,
sortable : true
},{
header : 'St