1. #1
    Sencha User
    Join Date
    Nov 2012
    Posts
    84
    Vote Rating
    0
    koolll is on a distinguished road

      0  

    Default Unanswered: Add button and data to tpl in panel

    Unanswered: Add button and data to tpl in panel


    Hi, I facing a problem nw. I need to show some data from datastore to tpl on a panel. But cant find any solution about this. Please guild me some example. Btw i am using mvc modal
    Here is my code
    Code:
    Ext.define('bluebutton.view.BlueButton.CouponList', {    extend: 'Ext.Panel',
        xtype: 'couponlistcard',
        id :'couponlistcard',
        requires: [
            'Ext.field.Select',
            'Ext.field.Search',
             'Ext.plugin.ListPaging',
            'Ext.plugin.PullRefresh',
    
    
        ],
    
    
       
    
    
        config: {
            styleHtmlContent: true,
            scrollable: 'vertical',
            itemHeight :20,
            variableHeights : false,
           grouped: true,
            indexBar: true,
             autoLoad: false,
           disclosure: true,
           plugins: [
    //                      
    //                        { xclass: 'Ext.plugin.PullRefresh',
    //                            refreshFn: function() {             
    //                            Ext.getStore('couponlist').load();
    //                             },
    //                    
    //                         }
                    ],
    
    
            
            emptyText: '<p class="no-search-results">No Member record found matching that search</p>',
    
    
    
    
        },
        
    
    
    });
    Here is my data store
    Code:
    Ext.define('bluebutton.store.BlueButton.Coupon', {    extend: 'Ext.data.Store',
    
    
        config: {
            grouper: {
                groupFn: function (record) {
                    return record.get('transaction_date');
                }
            },
    
    
            fields: ['transaction_id', 'user_id', 'content', 'imgUrl', 'transaction_description', 'transaction_date', 'transaction_time', 'reffernce_no', 'point', 'status'],
            pageSize: 5,
            autoLoad: false,
            storeId: 'transactionlist1',
            sorters: 'transaction_date',
            groupDir: 'DESC',
    
    
            data:
            [
                {
                    transaction_id: 'T0342342343',
                    reffernce_no: 'R001',
                    user_id: 'Anthony Tan',
                    imgUrl: '/bluebutton/resources/images/voucher.jpg',
                    transaction_description: 'Old town promotion buy 3 free 1',
                    transaction_date: '26/11/2012',
                    transaction_time: '11:52 AM',
                    point: '10',
                    status: 'Add',
                    content: '<div><i>this is what you think but not what you want. </i></div>'
                },
    
    
                {
                    transaction_id: 'T0002',
                    reffernce_no: 'R002',
                    user_id: 'Kenny',
                    imgUrl: '/bluebutton/resources/images/voucher.jpg',
                    transaction_description: 'KFC promotion 10% dicount',
                    transaction_date: '27/11/2012',
                    transaction_time: '11:00 AM',
                    point: '12',
                    status: 'Redeem',
                    content: '<div><i>this is what you think but not what you want. </i></div>'
                },
    
    
                {
                    transaction_id: 'T0003',
                    user_id: 'Alex',
                    reffernce_no: 'R003',
                    imgUrl: '/bluebutton/resources/images/voucher.jpg',
                    transaction_description: 'Mcd Promotion buy 3 burger free 1',
                    transaction_date: '29/11/2012',
                    transaction_time: '05:04 AM',
                    point: '20',
                    status: 'Add',
                    content: '<div><i>this is what you think but not what you want. </i></div>'
                },
    
    
                {
                    transaction_id: 'T0004',
                    user_id: 'user1',
                    reffernce_no: 'R004',
                    imgUrl: '/bluebutton/resources/images/voucher.jpg',
                    transaction_description: 'Under Promotion buy 3 free 1',
                    transaction_date: '30/11/2012',
                    transaction_time: '07:08 AM',
                    point: '26',
                    status: 'Add',
                    content: '<div><i>this is what you think but not what you want. </i></div>'
                }
    
    
            ]
        }
    });
    Hw can i extract the data to the tpl? btw i also need to add a button to tpl. thanks

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,782
    Answers
    3465
    Vote Rating
    833
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Why aren't you extending Ext.dataview.List instead of Ext.Panel? What UI are you wanting, maybe there is a reason for extending Ext.Panel?
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Nov 2012
    Posts
    84
    Vote Rating
    0
    koolll is on a distinguished road

      0  

    Default


    Hi,
    bro cos I need to generate a vertical list.So i need to use tpl as my listing page. On other hand, If using dataview , each row can consist of only one item. Maybe I am wrong, please guild me any example thanks

Thread Participants: 1

Tags for this Thread

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