Results 1 to 4 of 4

Thread: How to dispatch a controller on a list disclosure?

  1. #1

    Default Answered: How to dispatch a controller on a list disclosure?

    How can I dispatch a controller on a list disclosure.

    I tried :
    Code:
    {
        xtype: 'list',
        cls: 'event',
        store: 'EventList',
        flex: 1,
        //ui: 'round',
        disclosure: true,
        itemTpl: '<p class=\'title2\'>{Title}</p> <div class=\'category\'>{Category}</div> <div class=\'loc\'>{Location}<div>',
        
        
        onItemDisclosure: function(list, record) {
            
        }
    and controller
    Code:
    onItemButtonTap: function(list, record)
            {
                
                Ext.Msg.alert(record.get('Title'), 'It work\'s', Ext.EmptyFn);
                
            }
    Error found:
    Object 0 has no method 'get'

    If I tried on controller

    Code:
    Ext.Msg.alert('My own name', 'It work\'s', Ext.EmptyFn);
    Then it works without any issue.


    How can I fix it?


  2. #2
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,450
    Answers
    3997

    Default

    You should listen for the disclose event on the list in your controller.
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Fullstack Engineer
    ________________
    Modus Create is based on the model of an open source team. We’re a remote, global team of experts in our field. To find out more about the work we do, head over to our website.

    Check out my GitHub:
    https://github.com/mitchellsimoens

  3. #3

    Default

    really thanks for your quick replay.

    Please explain or provide me a example.

  4. #4
    Sencha User
    Join Date
    Jan 2011
    Posts
    134
    Answers
    6

Tags for this Thread

Posting Permissions

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