fieldset field and deepModel problem

66 views
Skip to first unread message

alessandro francia

unread,
Apr 11, 2014, 7:06:38 AM4/11/14
to backbon...@googlegroups.com
Hi guys!
I've a problem!
i don't know why if i write my form like this 

fieldsets: 
[{
fields: ["organizations","appRoleId"],
legend: $.i18n.prop('label.profileData')
},
{  
fields: ["userID","username","firstName","lastName","languageInfo.languageID"],
legend: $.i18n.prop('label.userData')
}]

the deep attribute is skipped,
instead if i write like


fields: ["userID","username","firstName","lastName","languageInfo.languageID"]
 
without use the fieldset it works!

i  need to have defferent fieldset with legend...

where is the mistake??

my schema:



schema : {
userID: {
           type: 'Hidden'
       },
username: {
           type: 'Text',
           editorAttrs: { style: 'height: 28px;width: 200px;',disabled:'true'},
           title: $.i18n.prop('label.username') + ' *'
       },
       firstName: {
           type: 'Text',
           editorAttrs: { style: 'height: 28px;width: 200px;'},
           validators: [{
            type: 'required', message: $.i18n.prop('validation.required')
           }],
           title: $.i18n.prop('label.firstName') + ' *'
       },
       lastName: {
           type: 'Text',
           editorAttrs: { style: 'height: 28px;width: 200px;'},
           validators: [{
            type: 'required', message: $.i18n.prop('validation.required')
           }],
           title: $.i18n.prop('label.lastName') + ' *'
       },
       languageInfo: {
        type: 'Object', subSchema:{
        languageID: {
        type: 'Select', 
                options: function(callback){
                var json = [];
                var languages = new LanguageModel();
                languages.fetch({
                   async: false,
                   success: function (langs, response, options) {
                    json[response.length + 1];
                    json[0] = {"val" : "" , "label" : ""};
                    for(var i = 0; i < response.length; i++){
                    var elem = response[i];
                    var temp = {"val" : elem.languageID , "label" : elem.languageName};
                    json[i + 1] = temp;
                    }
                   }
               });
                callback(json);
                },
                editorAttrs: {style: 'width: 200px' , 'data-form': 'select2', "class" : "singleLoadStyleForm"},
                title: $.i18n.prop('label.language') + ' *',
                validators: [{
                    type: 'required', message: $.i18n.prop('validation.required')
                   }]
        }
        }
       }
       
},


i'm lost! thank you! 
Reply all
Reply to author
Forward
0 new messages