PDA

View Full Version : PagingToolbar calculates incorrect activePage (ext331)



wora
26 Jan 2011, 3:08 AM
When paging, my page number changed from page=1 to page=101.
I found that in changing one line in ext-all-debug I could fix that:
procedure getPageData, line 31998:

OLD: activePage : Math.ceil((this.cursor+this.pageSize)/this.pageSize),
NEW: activePage : Math.ceil((1*this.cursor+1*this.pageSize)/this.pageSize),

The problem is that the values of this.cursor ("050") and this.pageSize ("50") were concatenated instead of added. So this resulted in "05050"/"50" => 101.

There certainly is a better solution to this, I was just not able to find it :-)

Wolfgang