Gelmiş geçmiş en büyük porno sitemiz olan 2pe de her zaman en kaliteli pornoları sunmayı hedefledik. Diğer video sitemiz olan vuam da ise hd porno ağırlıklı çalışmalara başladık.

  1. #1
    Sencha User
    Join Date
    Mar 2007
    Posts
    25
    Vote Rating
    0
    javajunky is on a distinguished road

      0  

    Default AutoRefreshing JSonViews

    AutoRefreshing JSonViews


    I'm sorry for yet another daft post, aI missing a really obvious way to mark JsonViews as 'auto-refresh'. I can't seem to spot a config parameter for it, nor can I see from the docs a way to get hold of an associated UpdateManager for the object (is there one? )

    Just for reference the code I'm using for the initial display of the json-view is as follows:
    Code:
    				var view = new YAHOO.ext.JsonView('Container', '<div>{foo} - {bar}</div>', { multiSelect: true, jsonRoot: 'data' });
    				view.load('data.html');
    Where data.html contains:
    Code:
    {"data":[{"foo":"poo","bar":"poop"}, {"foo":"boo","bar":"boop"}]}
    Now this works perfectl and my template is rendered, bonus But now I'd like to change it so if data.html is changed, then the rendered view would automatically change to represent it . Am I approaching this correctly ? Would I be better off using a raw UpdateManager, and returning the pre-rendered divs , rather than the JSON?

    Sorry if this is stupid!

  2. #2
    Sencha User
    Join Date
    Mar 2007
    Posts
    25
    Vote Rating
    0
    javajunky is on a distinguished road

      0  

    Default


    Just for future reference in case anyone else wanted the same behaviour, the following appears to work just fine (for a 5 second automatic refresh):
    Code:
    var view = new YAHOO.ext.JsonView('Container', '<div>{foo} - {bar}</div>', { multiSelect: true, jsonRoot: 'data' });
    view.el.updateManager.showLoadIndicator= false;
    view.load({url:'data.html', nocache: true});
    view.el.updateManager.startAutoRefresh(5);
    Note I also disabled the 'showLoadIndicator' to avoid the flicker when it pops up the 'Loading' text by default.[/quote]

  3. #3
    Ext User
    Join Date
    May 2007
    Posts
    7
    Vote Rating
    0
    jax is on a distinguished road

      0  

    Default


    you can do like this
    Code:
    var view = new YAHOO.ext.JsonView('Container', '<div>{foo} - {bar}</div>', { multiSelect: true, jsonRoot: 'data' });
    view.el.updateManager.showLoadIndicator= false;
    view.load({url:'data.html', nocache: true});
    view.el.updateManager.startAutoRefresh(5,'data.html');

Thread Participants: 1