1. #1
    Ext User
    Join Date
    Mar 2007
    Posts
    94
    Vote Rating
    0
    danvega is on a distinguished road

      0  

    Default Refreshing a list's view

    Refreshing a list's view


    So I have a list and there are 4 buttons at the top of the screen Wed,Thurs,Fri,Sat. When you click one loadData method is called (below) which basically updates the list store with new data.

    I found a small bug with my application and I am not quite sure how to fix it. Say on Wed you scroll half way down a long list and then click Fri. The list is still in the same position, in other words it did not go back to the beginning. I understand why as well, we are updating the data not the UI Component. Is there a way to refresh the view and have it start at the 1st data item?

    I tried the method refresh() on the list but that did not work

    Code:
    	loadData: function(b,e){
    		Ext.getBody().mask(false, '<div class="loading">Loading&hellip;</div>');
    		var dURL = 'data/' + b.id + '.txt';
    		
    		Ext.Ajax.request({				
    			url: dURL,//replace with AJAX call
    				success: function(response, opts) {
    					Ext.getBody().unmask();
    					result = JSON.parse(response.responseText);					
    					var item = result;
    					if (item) {
    						Ext.getCmp('sessionList').getStore().loadData(item);
    					}
    					else {
    						//alert('There was an error retrieving the list.');
    					}
    				},
    				failure: function(response, opts){
    					Ext.getBody().unmask();
    				}
    		});
    	}

  2. #2
    Sencha User
    Join Date
    May 2010
    Posts
    9
    Vote Rating
    0
    Sh1n1 is on a distinguished road

      0  

    Default


    Maybe this will do:

    yourList.scroller.scrollTo({x: 0, y: 0}, true); // scroll to the top

    At least, it works fine for me in a similar situation.

  3. #3
    Ext User
    Join Date
    Mar 2007
    Posts
    94
    Vote Rating
    0
    danvega is on a distinguished road

      0  

    Default


    That works but it introduced a new bug. The load data method is called any time data needs to be loaded, this includes when the application loads. For whatever reason calling scroll to is causing my bottom toolbar to disappear

Similar Threads

  1. Replies: 22
    Last Post: 1 Nov 2009, 11:45 PM
  2. View wish list
    By msobczak in forum Ext.nd for Notes/Domino
    Replies: 0
    Last Post: 29 Sep 2009, 7:26 AM
  3. Advanced List View example
    By rohanforu in forum Ext GWT: Help & Discussion (1.x)
    Replies: 0
    Last Post: 28 Apr 2009, 7:33 AM
  4. List view which behaves like windows explorer list view
    By suvarnal in forum Ext GWT: Help & Discussion (1.x)
    Replies: 4
    Last Post: 9 Dec 2008, 5:39 AM
  5. Replies: 11
    Last Post: 25 Sep 2008, 10:26 PM

Thread Participants: 1

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..."