1. #1
    Sencha User
    Join Date
    Jan 2013
    Posts
    2
    Vote Rating
    0
    pzo is on a distinguished road

      0  

    Default Infinite list or collection list and scrolling on both directions

    Infinite list or collection list and scrolling on both directions


    I'm new to sencha touch and trying to learn framework and figure out if its possible to have dynamic list that is infinitely scrollable but on both sides ( top and bottom). E.g. imagine having a calendar view that is at the beginning set to current month but naturally you can scroll to previous months as well future months.


    I would like to have the the following layout:<br>


    Code:
    ....
    ....
    ---------------------
    2013 January
    ---------------------
    31 1  2  3  4  5  6
    ---------------------
    7  8  9 10 11 12 13
    ---------------------
    14 15 16 17 18 19 20
    ---------------------
    21 22 23 24 25 26 27
    ---------------------
    28 29 30 31 1  2  3
    ---------------------
    - meet mike
    ---------------------
    - meet tom
    ---------------------
    2013 February
    ---------------------
    ...
    ...

    Because time is infinite I can't have fixed data store. I guess limiting time to e.g. 1950 - 2050 range is a
    some workaround but still performance would be affected. Is there any way to have a buffered list with buffered store which data would be fetched/calculated based on currently visible month (and e.g. buffering 2 adjacent months)?


    I'm also wondering if using list is really the way to tackle this thing since I have also at the bottom month list with events for the selected days which can be toggled and obviously its count can differ.


    Ideally I would like to have sort of a buffered 'collection list' where each item would my custom MonthView component containing list items. I tried to search but couldn't find anything like collection list in sencha touch - there is carousel, but here I want to have a continuous scrolling.


    Any help (keywords, components names to check, links) from somebody with more insight on sencha touch if something like this is possible is greatly appreciated.

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,327
    Vote Rating
    850
    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


    I don't think list is going to fit your needs. Reason is List does support infinite scrolling (starts at the first record) but it wants all the records in the store so you would need to load everything up front. So the store doesn't support infinite ability.
    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
    Join Date
    Jan 2013
    Posts
    2
    Vote Rating
    0
    pzo is on a distinguished road

      0  

    Default


    Thx michell for feedback,

    Can you give me some hint if the best way to obtain something similar to my needs is to implement some component extending from 'Ext.scroll.View' (or Ext.container with scrollbar?) and manually buffering data and updating scroll position? Or is it my particular case better to go for plain javascript (thought I would prefer something structured like sencha touch). Is there any sample/tutorial how to extends scrollbar that I can take a look? Thx.

Thread Participants: 1

Tags for this Thread