Results 1 to 9 of 9

Thread: Dataview + PagingToolbar + XML

  1. #1
    Sencha Premium User
    Join Date
    Jun 2008
    Location
    Belgium
    Posts
    265

    Red face Dataview + PagingToolbar + XML

    Code:
       var storegros = new Ext.data.Store({
            proxy: new Ext.data.HttpProxy({
                url: 'images/grosoeuvre_xml/index.xml',
                method: 'GET'
            }),
            reader: new Ext.data.XmlReader({
                record: 'image'
            }, [{
                name: 'itemNumber',
                type: 'float'
            }, 'itemThumbnailImage', 'itemLargeImage', 'itemName']),
            sortInfo: {
                field: 'itemNumber',
                direction: 'ASC'
            }
        });
        var p_gallery_housebuild = new Ext.Panel({
            id: 'p_gallery_housebuild',
            margins: '0 0 0 0',
            loadMask: true,
            border: false,
            frame: true,
            loadMask: true,
            autoScroll: true,
            items: new Ext.DataView({
                id: 'dv_gallery_housebuild',
                store: storegros,
                tpl: new Ext.XTemplate('<tpl for=".">', '<div class="thumb-wrap" id="{itemNumber}">', '<div class="thumb"><img src="images/grosoeuvre_xml/{itemThumbnailImage}" title="{itemName}"></div>', '<span class="x-editable">{itemName}</span></div>', '</tpl>', '<div class="x-clear"></div>'),
                autoHeight: true,
                overClass: 'x-view-over',
                itemSelector: 'div.thumb-wrap',
                emptyText: 'No images to display'
            
            }),
            bbar: new Ext.PagingToolbar({
                pageSize: 10,
                store: storegros,
                autoLoad: true
            })
        });
        storegros.load({
            params: {
                start: 0,
                limit: 20
            }
        });
    Having the above code, the pagingToolbar "does not work"; it does not page... Just to confirm me the only way to page the data is to script (php) the start limit. There is no way to page the loaded XML directly...

    [out of scope]Body melting, too warm, no air condi...[/out of scope]

  2. #2
    Sencha Premium User
    Join Date
    Jun 2008
    Location
    Belgium
    Posts
    265

    Default

    No comment?

  3. #3
    Sencha User Animal's Avatar
    Join Date
    Mar 2007
    Location
    Bédoin/Nottingham
    Posts
    30,892

    Default

    Comment?

    How can you "page" an XML file?

    Paging is done by the server. The PagingToolbar requests a start and end position, and the server must respond with just those rows.

  4. #4
    Sencha User Animal's Avatar
    Join Date
    Mar 2007
    Location
    Bédoin/Nottingham
    Posts
    30,892

    Default

    Use the 3.0 API docs for more info. (You should also upgrade ASAP)

    http://extjs.com/deploy/ext-3.0-rc3/....PagingToolbar

  5. #5
    Sencha Premium User
    Join Date
    Jun 2008
    Location
    Belgium
    Posts
    265

    Default

    Quote Originally Posted by Animal View Post
    Comment?

    How can you "page" an XML file?

    Paging is done by the server. The PagingToolbar requests a start and end position, and the server must respond with just those rows.
    I wanted to be sure that no work around existed.

    The idea was to have a "no server requested" as a store is able to parse a XML; I was thinking to be able querying a store directly. Reading the store and output json or xml in another store to be read by the dataview (someting like this)

    Thanks for the links to the UX

    About the 3.0 RC2 is it stable for move from 2.2.1 ?

  6. #6
    Sencha User Animal's Avatar
    Join Date
    Mar 2007
    Location
    Bédoin/Nottingham
    Posts
    30,892

    Default

    It's RC3 now.

    And it is very stable. There has been a lot of hard work put in by the dev team (and by early adopting testers) to iron out bugs.

    There are changes to be made. See the thread in the 3.0 help folder.

    But it's a very worthwhile upgrade.

  7. #7
    Sencha Premium User
    Join Date
    Jun 2008
    Location
    Belgium
    Posts
    265

    Default

    I did not notice the news about RC3 ... I will download it now and test some of my apps to see the impact (I have read that the Statusbar object is not there anymore; to have it an UX is there)

  8. #8
    Sencha User Animal's Avatar
    Join Date
    Mar 2007
    Location
    Bédoin/Nottingham
    Posts
    30,892

  9. #9
    Sencha Premium User
    Join Date
    Jun 2008
    Location
    Belgium
    Posts
    265

    Default

    thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •