1. #1
    Sencha User
    Join Date
    Jul 2012
    Posts
    38
    Vote Rating
    0
    dboy221 is on a distinguished road

      0  

    Default List ItemTap Event Fails On Subsequent Viewings of ListView

    List ItemTap Event Fails On Subsequent Viewings of ListView


    I have a navigation view with a button that pushes a ListView into place. When I hit the back button to go back to the main navigation view and then revisit the listview, the item tap event for my list fails to invoke when selecting an item. On initial viewing of the list I can select an item and the item tap event fires. Any assistance with this issue will be greatly appreciated. Thanks in advance.

  2. #2
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,261
    Vote Rating
    121
    aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold

      0  

    Default


    Are you destroying the item? Do you have colliding ids? Nothing in particular rings bells. Can you post a simple archive of an example that shows the same behavior?
    Aaron Conran
    @aconran
    Sencha Architect Development Team

  3. #3
    Sencha User
    Join Date
    Jul 2012
    Posts
    38
    Vote Rating
    0
    dboy221 is on a distinguished road

      0  

    Default Posted Archive

    Posted Archive


    I have attached a copy of the project archive.
    Attached Files

  4. #4
    Ext JS Premium Member
    Join Date
    Dec 2008
    Location
    Oregon
    Posts
    4
    Vote Rating
    0
    mdoddridge is on a distinguished road

      0  

    Default Encountering this same issue

    Encountering this same issue


    I'm creating my first Sencha Touch application and am encountering this same problem.
    My app has a couple of buttons that lead to ListViews which then have an item tap controller action attached that goes to a detail view/panel. Whenever I use the Back Button to go back to the button view after going to the detail view and then clicking to the ListView I can no longer get to the detail view the itemtap controller is not being fired.
    I've used the Safari Developer Tool and set a break point just inside the Controller and it is not hit.

    Any help to solve this issue is appreciated.

  5. #5
    Sencha User ericbowden's Avatar
    Join Date
    May 2012
    Location
    Provo, UT
    Posts
    25
    Vote Rating
    2
    ericbowden is on a distinguished road

      0  

    Default


    It looks like the listView is getting created when you hit the button in your navView and destroyed every time you hit the back button, which must be causing problems for the selector in your control. This very well could be a bug.

    I changed your selector in your control to be more specific and it seems to have fixed the problem.

    Code:
    control: {   
       "#mainNav #listZoneCoordinators": {
            itemtap: 'onListZoneCoordinatorsItemTap'
        }
    }

  6. #6
    Ext JS Premium Member
    Join Date
    Dec 2008
    Location
    Oregon
    Posts
    4
    Vote Rating
    0
    mdoddridge is on a distinguished road

      0  

    Default


    I applied a similar thing and it worked for me:

    Code:
            control: {
                "#loginNavigationView #personList": {
                    itemtap: 'onActivityListItemTap'
                }

  7. #7
    Sencha User
    Join Date
    Jul 2012
    Posts
    38
    Vote Rating
    0
    dboy221 is on a distinguished road

      0  

    Default


    Where am I to apply this code as I am using Sencha Architect.

  8. #8
    Ext JS Premium Member
    Join Date
    Dec 2008
    Location
    Oregon
    Posts
    4
    Vote Rating
    0
    mdoddridge is on a distinguished road

      0  

    Default


    I too, am using Sencha architect.
    Under your Application Controllers you would click on the itemtap - 'onListZoneCoordinatorsItemTap'.
    Then in the Config area under the ControllerAction section, you would change the controlQuery from: #listZoneCoordinators to: #mainNav #listZoneCoordinators.

  9. #9
    Sencha User
    Join Date
    Jul 2012
    Posts
    38
    Vote Rating
    0
    dboy221 is on a distinguished road

      0  

    Default


    Ah. Got it. Works now. Thanks everyone for the assistance with this.

  10. #10
    Sencha User
    Join Date
    Feb 2012
    Posts
    91
    Vote Rating
    2
    satishs is on a distinguished road

      0  

    Default


    guys...I spent precious three hours banging my head trying to fix this problem..thanks for this post, it is now resolved.

    Is a a bug, if yes will it be fixed in next release? or this is the way we need to code in future.

    Thanks,
    ST