Results 1 to 5 of 5

Thread: Touch 2 List loading mask problem !!!!

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Sencha User
    Join Date
    Sep 2012
    Vote Rating

    Default Answered: Touch 2 List loading mask problem !!!!

    I have a question about set list masked. Here is my code. I use "masked" to gray out the list before data get loaded. But how can I remove the mask afterward?

    I tried to listen to the event load.. but it never fired.. which event i should listen to ?
    also, I tried to use c.setMasked(false); but it does't work. how can i get the list instance inside the event function?

        var list =     {
          xtype: 'list',
          title: 'Game List',
          id: 'gameList',
          ui: 'round',
          flex: 1,
          width: 300,
          store: 'Games',
          cls: 'gameList',
          masked: {
                    xtype: 'loadmask',
                    message: 'loading data'
                }, // masked
          listeners: {
            painted: function(c) {
          itemTpl: Ext.create('Ext.XTemplate',
           '<div class="game">',
           '<img class="gameuserpic" src="{userPic}" />',
           '<img class="gamemoveimg" src="resources/images/{action}.png"/>',
           '<p class="info">{userName}</p>',
           '<p class="move">{move}</p>',
          //end itemTPl
          emptyText: 'Create some new Game!!'

  2. List components will handle the removal of the mask automatically. Here's the snippet from the source of Ext.dataview.Dataview related to that:

    onLoad: function(store) {
        //remove any masks on the store
        this.hasLoadedStore = true;
        if (!store.getCount()) {
    Your call to setMasked in the painted event failed because the parameter for that event is not a component but the element. Since the list automatically handles the removal of that mask, you don't need that painted event in there anymore.


Posting Permissions

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