Results 1 to 5 of 5

Thread: Problem when loading a list for the second time

  1. #1
    Sencha User
    Join Date
    Feb 2012
    Location
    Bangalore
    Posts
    19
    Vote Rating
    0
      0  

    Default Problem when loading a list for the second time

    Hi,

    I am creating a sample app where i use list in a lot of areas.Now i have come across a problem.When i load a list for the first time the data will come without any problem,but when i go back and try to load the list again nothing happens.Can anyone clarify why this is happening...

    Regards,
    bensam90

  2. #2
    Sencha User
    Join Date
    Feb 2012
    Posts
    17
    Vote Rating
    0
      0  

    Default

    if you are using list without a store try (re)loading data like this:

    Code:
    if (myList.getStore() != null)
         myList.getStore().removeAll();
    myList.setData(newData);

  3. #3
    Sencha User
    Join Date
    Feb 2012
    Location
    Bangalore
    Posts
    19
    Vote Rating
    0
      0  

    Default

    The problem is that when i tap on a list item ,then page navigation occurs.But when i go back and try to tap another item list, no navigation occurs.I checked and see that the first data,is being loaded again for every other list item.this is caused only when i try to navigate from a list to another page when taped on the item.otherwise there is no problem.

  4. #4
    Sencha User
    Join Date
    Feb 2012
    Posts
    17
    Vote Rating
    0
      0  

    Default

    Can you provide an example how you load your list and itemtap listener?

  5. #5
    Sencha User
    Join Date
    Feb 2012
    Location
    Bangalore
    Posts
    19
    Vote Rating
    0
      0  

    Default

    Yaa.
    I don't have the code ri8 now.But i will give you an idea.

    I have a list containing say AGENT & CUSTOMER as the items..on tapping any 1, i navigate to another page.The tap action is made possible by fetching the index.If i tap on Agent say index is 0 it will navigate to another page and for Customer index is 1 then navigate to other page.If i tap on Agent/Customer for the first time, it navigates fine and the data to the page is coming,but if i go back and try to tap Agent or Customer then no navigation occurs, but i don't get any error.and i tried to show the data on the console ,it is showing the data which came for the first attempt every time i tap,but no navigation.This is the rough sketelon..I will share the code i used soon..

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •