1. #1
    Sencha User Tim Toady's Avatar
    Join Date
    Feb 2010
    Location
    Pennsylvania
    Posts
    536
    Answers
    61
    Vote Rating
    70
    Tim Toady is a jewel in the rough Tim Toady is a jewel in the rough Tim Toady is a jewel in the rough Tim Toady is a jewel in the rough

      0  

    Default Unanswered: Cleanest way to use Column Renderer with MVC?

    Unanswered: Cleanest way to use Column Renderer with MVC?


    Hey.

    How are you guys using renderers with MVC? I don't really want to do the logic in the view, but dynamically setting them from the controller seems sorta weird too. The feed-viewer mvc example does it in the view. How do you guys handle it?

    Thanks

  2. #2
    Sencha User Tim Toady's Avatar
    Join Date
    Feb 2010
    Location
    Pennsylvania
    Posts
    536
    Answers
    61
    Vote Rating
    70
    Tim Toady is a jewel in the rough Tim Toady is a jewel in the rough Tim Toady is a jewel in the rough Tim Toady is a jewel in the rough

      0  

    Default


    nobody?

  3. #3
    Sencha - Community Support Team friend's Avatar
    Join Date
    Apr 2011
    Posts
    895
    Answers
    106
    Vote Rating
    27
    friend has a spectacular aura about friend has a spectacular aura about

      0  

    Default


    I typically create a Singleton Renderer class which contains all the renderers used throughout my app.

    Code:
    /**
     * Singleton which encapsulates system-specific renderers.
     */
    Ext.define('Myapp.view.widgets.Renderers', {
      singleton: true,
    
      active: function(value, p, record) {
          var image = null;
          if (value == true) {
            image = 'active.png';
          } else {
            image = 'inactive.png';
          }
          return '<img src="resources/images/' + image + '">';
      },
          
      activeOnly: function(value, p, record)
      {
        var result = '';
        if (value == true) {
          result = '<img src="resources/images/active.png">';
        }
        return result; 
      },
    
      expired: function(value, p, record) {
        var result = '';
        if (value == true) {
          result = true
        }
        return result;
      },
      
      
      locked: function(value, p, record) {
        var result = '';
        if (value) {
          result = '<img src="resources/images/lock.png">';  
        }
        return result;
      },
    
      roleQuickTip: function(value, metaData, record, rowIndex, colIndex, store) {
        metaData.tdAttr = 'data-qtip="' + record.get('description') + '"';
    
        // primary roles get highlighted.
        if (record.get('primaryRole') == 1) {
          value = '<span class="primaryRole">' + value + '</span>';
        }
        return value;
      }
      
    });

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..." hd porno faketaxi