1. #1
    Sencha User riyaad's Avatar
    Join Date
    Jul 2011
    Location
    Cape Town
    Posts
    240
    Answers
    6
    Vote Rating
    1
    riyaad is on a distinguished road

      0  

    Default Unanswered: Upgraded to ST2.1 just broke my dataview

    Unanswered: Upgraded to ST2.1 just broke my dataview


    Hi guys,

    I've just upgraded from ST2.0.0 to ST2.1. I'm getting the following error (attached image)...

    Screen Shot 2012-11-07 at 11.21.45 AM.jpg

    Note that "app.js.716" points to my dataview (below the error)
    Code:
            var schedule = Ext.create('Ext.DataView', {
                itemTpl: tpl,
                store: offlineStore,
                scrollable: true,
                emptyText: '<div style="margin-top: 20px; text-align: center">empty …nothing</div>',
    ....
    Can anyone advise please?

    Thank you,
    Riyaad

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,633
    Answers
    3452
    Vote Rating
    818
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Looks like you are trying to use the PullRefresh plugin. This was only ever meant to work with Ext.dataview.List so it may have worked before but was not meant to work in Ext.dataview.DataView
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User riyaad's Avatar
    Join Date
    Jul 2011
    Location
    Cape Town
    Posts
    240
    Answers
    6
    Vote Rating
    1
    riyaad is on a distinguished road

      0  

    Default


    Hi Mitchell,

    That would be correct, I'm using the PullRefresh plugin to allow the user to update his/her details in the dataview (info being pulled from offline store etc). So are you saying that as of v2.1 that this is no longer allowed in the dataview and that I may need to use the list instead (unless I decide to remove the PullRefresh plugin)?

    Regards
    R

  4. #4
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,633
    Answers
    3452
    Vote Rating
    818
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Correct. That plugin is designed to only work with List and the List in 2.1 has changed to support infinite scrolling.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  5. #5
    Sencha User
    Join Date
    Apr 2012
    Posts
    82
    Answers
    4
    Vote Rating
    3
    matfin is on a distinguished road

      0  

    Default


    Hi,

    Thanks for that info. I think the documentation should be updated to reflect this. Will add a comment now.

    Thanks,

    Matt

  6. #6
    Sencha Premium Member
    Join Date
    Oct 2012
    Location
    Antibes
    Posts
    66
    Answers
    4
    Vote Rating
    0
    Gaspard22 is on a distinguished road

      0  

    Default How can i access to this plugin

    How can i access to this plugin


    i want the pullrefresh plugin (on my Ext.List) but where do i find the plugin ?

    thanks

  7. #7
    Sencha User
    Join Date
    Mar 2007
    Posts
    411
    Answers
    5
    Vote Rating
    17
    jweber will become famous soon enough

      0  

    Default


    I had a similar problem, and ended up making a copy of the PullRefresh plugin, but without the List-specific code.

    I think this plugin would be a good candidate for refactoring. There's the user-interface portion, which people might want to use on any component. And then there's the store-related code, which is only useful for DataViews. Maybe the latter could be moved into an adapter class, so the UI code is more reusable.

  8. #8
    Ext JS Premium Member
    Join Date
    Sep 2009
    Posts
    22
    Vote Rating
    0
    zlesko is on a distinguished road

      0  

    Default


    Would you mind posting that code? I am using both PullRefresh and ListPaging plugins with my DataViews.

  9. #9
    Sencha User
    Join Date
    Mar 2007
    Posts
    411
    Answers
    5
    Vote Rating
    17
    jweber will become famous soon enough

      0  

    Default


    To make it work with DataView, I think you only need to change line 147:

    Code:
            list.container.insert(0, me);
    to something like:

    Code:
            list.container ? list.container.insert(0, me) : list.insert(0, me);
    My code has gone in a different direction since I did this, so there might be other changes that I forgot about.