api - Sencha Touch dynamically render a model -
api - Sencha Touch dynamically render a model -
i have database construction based on eav model. each objects has different kind of metafields different names.
how create model in sencha touch dynamic?
thanks.
regards,
shafqat
there's nil preventing creating models @ run time.
function processeav(attributes, types){ var modeldef = { fields:[] } for(var = 0, len = attributes.length; < len; i++){ modeldef.fields.push({name:attributes[i], type: types[i]}); } ext.regmodel('newmodel', modeldef); }
you can add together additional properties needed validations , associations.
this isn't great you'll doing every time loaded. may improve to, on server, output model definitions whenever alter , include them mobile html document.
api mobile model sencha-touch entity-attribute-value
Comments
Post a Comment