1. #1
    Sencha User
    Join Date
    Feb 2012
    Posts
    8
    Vote Rating
    0
    bandicut is on a distinguished road

      0  

    Default Unanswered: PullRefresh Deleted Items

    Unanswered: PullRefresh Deleted Items


    Hi,

    I've got a simple store with an ajax request to get the news feed of a facebook fanpage. to refresh the list i use the build-in plugin pullrefresh

    It's working, but:

    If i delete a single news feed from facebook, the item will stay in the store till the list is refreshed manually (like browser refreshing).

    new entries appear if i refresh the list over pullrefresh, deleted entries did not disappear on pullrefresh.

    is it a bug or did i forget something?

    view.js
    Code:
    Ext.define('nicelandstudio.view.Facebook', {
               extend: 'Ext.dataview.List',
               
               xtype: 'facebook',
               
               config: {
                    title: 'Facebook',
                    iconCls: 'search',
                    store: 'Facebook',
                       plugins: [
                         {
                             xclass: 'Ext.plugin.PullRefresh',
                             pullRefreshText: 'Zum aktualisieren nach unten ziehen und loslassen!'
                         }
                    ],
                    itemTpl: [
                              '{message}'
                              ]
               }
            });
    model.js
    Code:
    Ext.define('nicelandstudio.model.Facebook', {
               extend: 'Ext.data.Model',
               config: {
                    fields: [
                        { name: 'message', type: 'string' },
                        { name: 'created_time', type: 'string' }                    
                    ]
               }
    });
    store.js
    Code:
    Ext.define('nicelandstudio.store.Facebook', {
               extend: 'Ext.data.Store',
               requires: ['nicelandstudio.model.Facebook'],
               config: {
                    model: 'nicelandstudio.model.Facebook',
                    autoLoad: true,
                    proxy: {
                        type: 'ajax',
                        url: 'https://graph.facebook.com/FANPAGE_ID/feed/',
    
                        extraParams: {
                            access_token: 'ACCESS_TOKEN'
                        },
                           reader : {
                               type : 'json',
                               rootProperty : 'data'
                           }           
                    }
               }
    });
    Thanks in advanced

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,754
    Answers
    3462
    Vote Rating
    828
    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


    If the server returns the item, it will display it regardless of if you deleted it locally or not.
    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
    Feb 2012
    Posts
    8
    Vote Rating
    0
    bandicut is on a distinguished road

      0  

    Default


    But the server didn't return the deleted item.

    short explanation:

    before:
    on facebook: 4 items
    server returns: 4 items
    in list: 4 items

    after deleting 1 facebookitem:
    on facebook: 3 items
    server returns: 3 items
    in list: 4 items (3 items returned + the deleted)

    greetings

  4. #4
    Sencha User
    Join Date
    Jul 2009
    Location
    Trois-Rivières, QC
    Posts
    7
    Vote Rating
    0
    MartinK7 is on a distinguished road

      0  

    Default


    I'm encountering the exact same situation; deleted items on the server are not removed from the list after doing a PullRefresh. A full page reload displays the correct list of items though.

    Looking forward for a solution...

Thread Participants: 2

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi