sencha touch - Dyanamically tab content adding issue -
here code in sencha. im having 4 tabs when click button action in tab content new view has been added in tab bar dynamically.here code
var wishlist = { standardsubmit : false, items: [ { xtype: 'fieldset', scope:this, defaults: { required: true, labelalign: 'left', }, title: 'hom', items: [ { xtype: 'textfield', name : 'password', label: 'category', useclearicon: true },{ xtype: 'textfield', name : 'password', label: 'location', useclearicon: true }], }, { xtype: 'button', text: 'add wish', ui: 'confirm', handler: function() { //here when click other view has been added in tab bar view.setactiveitem(0, {type:'fade', direction:'left'}); view.setactiveitem({ title: 'add wish', items: [wishlist] }); }); }, }] };
tab bar integeration code here
var view = ext.create('ext.tabpanel', { fullscreen: false, tabbarposition: 'bottom', items: [{ title: 'home', iconcls: 'home', items: [{ xtype: 'toolbar', title: 'my items', },wishlist] }, { title: 'items', iconcls: 'star', items: [{ xtype: 'toolbar', title: 'add items', },signinformbase] }, { title: 'profile', iconcls: 'user', items: [{ xtype: 'toolbar', title: 'my profile', },wishlist] },{ title: 'friends', iconcls: 'team', items: [{ xtype: 'toolbar', title: 'friends', },wishlist] }, });
please me sort out
you need start sencha docs , start building simple application.
learn sencha class system
in sencha framework folder there examples folder can find many examples there, use start leaning , experiment it.
then, need know more specific concepts store , mvc pattern
if not familiar mvc then
Comments
Post a Comment