Gelmiş geçmiş en büyük porno sitemiz olan 2pe de her zaman en kaliteli pornoları sunmayı hedefledik. Diğer video sitemiz olan vuam da ise hd porno ağırlıklı çalışmalara başladık.

  1. #1
    Sencha User
    Join Date
    Jul 2008
    Brooklyn NY
    Vote Rating
    tBSTAR is on a distinguished road


    Post Json and XTemplate question

    Json and XTemplate question


    I generate my json dynamically and if my object has empty fields, it will ignore them and therefore reducing the amount of text sent back to the client. Now, I get stuck when I am creating an Xtemplate because I wouldn't know if those properties exist or not and my question is: Is there a way to check before hand if they exist?
    This is my Json:
    "Header":"Dependent Information",
    "Name":"JANE  DOE",
    This is my JS:
    var tpl2 = new Ext.XTemplate(
                                '<div class="session-hd">',
                                    '<tpl if="this.isEmpty(Name)== false">',
                                        '<p>Name: {Name}</p>',
                                    '<tpl if="this.isEmpty(ID) == false">',
                                        '<p>ID: {ID}</p>',
                                    '<tpl if="this.isEmpty(Address)== false">',
                                    '<p>Address: {Address}</p>',
                                    '<tpl if="this.isEmpty(CSZ)== false">',
                                    '<tpl if="this.isEmpty(Date)== false">',
                                '</div>', {
                                 isEmpty: function(value){
                                     if (value=='null')
                                     return true
                                     else return false
    Thank you

  2. #2

Thread Participants: 1