how to move data from one page to another page in Senchatouch - extjs

I am developing one application in sencha touch, I am new to this technology
first see my code
View-->Main.js
Ext.define('DealsList.view.Main', {
extend: 'Ext.Container',
xtype: 'mainlist',
requires: [
'Ext.TitleBar',
'Ext.Toolbar'
],
config: {
fullscreen:true,
scrollable:false,
layout: {
// type:'fit'
},
items: [
{
xtype: 'toolbar',
//ui : 'green',
docked: 'top',
title: 'SampleDeals'
},
{
xtype:'formpanel',
fullscreen:false,
scrollable:false,
centered:true,
style: 'background-color: gray',
width:'90%',
height:'70%',
items:[
{
xtype:'selectfield',
name:'Grade',
label:'Grade',
options:[
{
text:'All',
value:'Agrade'
},
{
text:'Drink',
value:'Bgrade'
},
{
text:'Entertainment',
value:'cgrade'
},
{
text:'Food',
value:'Dgrade'
}
]
},
{
xtype:'searchfield',
id:'usernametext',
name:'ZipCode',
placeHolder:'ZipCode',
top:'25%'
},
{
xtype:'button',
text:'Gps On/Off',
id:'btnList',
ui:'action',
height:33,
top:'40%',
left:'5%',
right:'5%'
},
{
xtype:'selectfield',
name:'Grade',
label:'Grade',
top:'55%',
options:[
{
text:'2 miles',
value:'Agrade'
},
{
text:'5 miles',
value:'Bgrade'
},
{
text:'10 miles',
value:'cgrade'
},
{
text:'15+ miles',
value:'Dgrade'
}
]
},
{
xtype:'button',
text:'My Favorites',
id:'favbutton',
ui:'action',
width:150,
height:33,
top:'75%',
left:'5%'
}
,{
xtype:'button',
text:'Go',
id:'gobutton',
ui:'action',
width:100,
height:33,
top:'75%',
right:'5%',
handler:this.regButton,
scope:this
}
]
}
]
}
});
view-->ListPage.js
Ext.define('DealsList.view.ListPage', {
extend: 'Ext.List',
xtype: 'listPage',
requires:['Ext.data.Store','Ext.dataview.List','Ext.data.proxy.JsonP'],
config: {
// itemTpl: '<table><tr><td><img src="{imageUrl}" width="70%" height="70%"/></td><td> </td><td><div class=\"list-item-firstname\">{firstName}</div><div class=\"list-item-lastname\">{lastName}</div></td></tr></table>',
itemTpl: ' <table><tr>' +
'<td><img src="{logopath}"/></td>' +
'<td> </td>' +
'<td><div><h3>{subcategoryname}</h3></div>' +
'<div><h1>{specialinfo}</h1></div>' +
'<div>Price:{originalprice}</div>' +
'<div><h1>{fromdate}</h1></div>' +
'</td></tr></table>',
store: 'DetailStore',
onItemDisclosure: true,
items:
[
{
xtype:'toolbar',
title:'SampleDeals',
docked:'top',
items:[
{
xtype:'button',
id:'backbutton',
ui:'back',
text:'back'
}
]
}
]
}
});
view-->DealsDescription.js
Ext.define('DealsList.view.DealsDescription', {
extend: 'Ext.Container',
xtype: 'dealsdescription',
requires:['Ext.Toolbar','Ext.field.Email','Ext.field.Password'],
config: {
fullscreen:true,
scrollable:false,
layout: {
// type:'fit'
},
items: [
{
xtype:'toolbar',
docked:'top',
title:'SampleDeals',
items:[
{
xtype:'button',
id:'backbutton',
ui:'back',
text:'back'
}
]
},
{
xtype:'label',
html: '<h1>{subcategoryname}</h1>'
//html: ["test test"].join("") '',
},
{
xtype:'label',
html: '<h1>{dealtimestampfrom}</h1>'
//html: ["test test"].join("") '',
},
{
xtype:'label',
html: '<h1>{specialinfo}</h1>'
//html: ["test test"].join("") '',
},
{
xtype:'label',
html: '<h1>{originalprice}</h1>'
//html: ["test test"].join("") '',
},
{
xtype:'button',
text:'Button',
id:'xxxbutton',
ui:'action',
top:'30%',
left:'35%',
right:'35%',
handler:this.saveButton
}
]
}
});
Store-->DetailStore.js
Ext.define('DealsList.store.DetailStore', {
extend: 'Ext.data.Store',
config: {
model: 'DealsList.model.DetailModel',
autoLoad: true,
remoteFilter: true,
//sorters: 'leadid',
grouper: {
groupFn: function(record) {
// return record.get('user_id')[0];
return record.get('dealtimestampfrom')[0];
}
},
proxy: {
type: 'ajax',
//url: 'http://113.193.181.53:8081/Test/chat/index.php/chat/onlineusers',
url:'http://www.nomdeal.com/services/getbusinessoffers?catid=All&subcatid=All&lat=17.4418224&lng=78.4752594&dist=1000&userid=100&zipcode=&pagesize=1',
//headers: {'Authorization': 'Basic GVU0IXZ6cFGzczE='},
reader: {
type: 'json',
model: 'DealsList.model.DetailModel',
// rootProperty: 'online-users'
record:'businessholder',
rootProperty: 'specialinfo'
// rootProperty:''
}
}
}
});
Model-->DetailModel.js
Ext.define('DealsList.model.DetailModel', {
extend: 'Ext.data.Model',
config: {
fields: [
{name: "dealtimestampfrom", type: "string"},
{name: "dealtimestampto", type: "string"},
{name: "subcategoryname", type: "string"},
{name: "specialinfo", type: "string"},
{name: "originalprice", type: "string"},
{name: "logopath", type: "string"},
{name: "fromdate", type: "string"}
]
}
});
Controller-->dealscontroller.js
Ext.define('DealsList.controller.dealscontroller', {
extend: 'Ext.app.Controller',
config: {
refs: {
BtnList:'#btnList',
listPage:'listPage',
mainpage:'mainlist',
backHome:'#backbutton',
goButton:'#gobutton',
DealsDescriptionpage:'dealsdescription'
},
control: {
goButton:
{
tap:'mainCategories'
},
backHome:
{
tap:'backToHome'
},
listPage:
{
itemtap: 'ListItemSelect'
}
}
},
// Transitions
slideLeftTransition: { type: 'slide', direction: 'left' },
slideRightTransition: { type: 'slide', direction: 'right' },
//called when the Application is launched, remove if not needed
launch: function(app) {
},
mainCategories:function()
{
//alert('sf');
Ext.Viewport.animateActiveItem(this.getListPage(), this.slideLeftTransition);
},
backToHome:function()
{
Ext.Viewport.animateActiveItem(this.getMainpage(), this.slideLeftTransition);
},
ListItemSelect : function (list, index, element, record)
{
Ext.Msg.alert('Alert',record.get('subcategoryname'));
Ext.Viewport.animateActiveItem(this.getDealsDescriptionpage(), this.slideLeftTransition);
}
});
app.js
//<debug>
Ext.Loader.setPath({
'Ext': 'touch/src',
'DealsList': 'app'
});
//</debug>
Ext.application({
controllers: ["dealscontroller"],
name: 'DealsList',
requires: [
'Ext.MessageBox'
],
views: ['Main','ListPage','DealsDescription'],
stores:['DetailStore'],
models:['DetailModel'],
icon: {
'57': 'resources/icons/Icon.png',
'72': 'resources/icons/Icon~ipad.png',
'114': 'resources/icons/Icon#2x.png',
'144': 'resources/icons/Icon~ipad#2x.png'
},
isIconPrecomposed: true,
startupImage: {
'320x460': 'resources/startup/320x460.jpg',
'640x920': 'resources/startup/640x920.png',
'768x1004': 'resources/startup/768x1004.png',
'748x1024': 'resources/startup/748x1024.png',
'1536x2008': 'resources/startup/1536x2008.png',
'1496x2048': 'resources/startup/1496x2048.png'
},
launch: function()
{
// Destroy the #appLoadingIndicator element
Ext.fly('appLoadingIndicator').destroy();
var mainPage = {
xtype:'mainlist'
};
var listpage = {
xtype:'listPage'
};
var dealsdescription = {
xtype:'dealsdescription'
};
// Initialize the main view
Ext.Viewport.add(([mainPage,listpage,dealsdescription]));
},
onUpdated: function() {
Ext.Msg.confirm(
"Application Update",
"This application has just successfully been updated to the latest version. Reload now?",
function(buttonId) {
if (buttonId === 'yes') {
window.location.reload();
}
}
);
}
});
In my app's first screen I have a go button. When I click on this button it displays a list(listpage.js) my problem is, when I click on a listitem data is not moving to the nextpage(DealsDescription.js). My requrement is that the data moves to next page and is appended to that xtype:label(DealsDescription.js screen)

Most of us set up a one page application. So you switch cards (or tabs or so...) in staid of refreshing the page. This way you can always get to the data though javascript. Navigating up or down the component tree.
Up:
mycomponent.up() //go up one level
mycomponent.up(selector) //go up till you reach the component meeting the criteria
Down:
mycomponent.query(someComponentQuery) //go down and find all components meeting the criteria
mycomponent.getComponent(componentId) //get the (direct) child with given Id
If you do want to load a new page you need a whole new app.. So you could use session or local storage to transfer data between pages. (use a sessionstorageProxy or localstorageProxy on your store/model).

Basically you have to declare a data holder variable in view's config and while creating this view you can initialize it with whatever data you want.
var myView = Ext.create('DealsList.view.DealsDescription', {
rec : someData //this would contain all data
});
Then in initialize you can access this rec like this:
var data = this.config.rec;
then you can create all internal components and add to this view's container.
var items = [{
xtype:'toolbar',
docked:'top',
title:'SampleDeals',
items:[
{
xtype:'button',
id:'backbutton',
ui:'back',
text:'back'
}
]
},
{
xtype:'label',
html: '<h1>'+data.subcategoryname+'</h1>'
}];
this.setItems(items);

Related

Item Click grid. Change label text

I have no trouble clicking grid items and updating textfields but do you think I change a label text? grrr
All I want to do is when I select a record set in the grid is to update the label text and text field(which it already does).
Model
Ext.define("myApp.model.ActionItem", {
extend : "Ext.data.Model",
fields : [
{
name: 'pri',
type: 'int'
},
{
name: 'request',
type: 'int'
}
]
});
Controller:
Ext.define("myApp.controller.HomeController", {
extend: "Ext.app.Controller",
id: "HomeController",
refs: [
{ ref: "ActionItemsGrid", selector: "[xtype=actionitemgrid]" },
{ ref: "DetailsPanel", selector: "[xtype=actionitemdetails]" }
],
pri: "",
models: ["ActionItem"],
stores: ["myActionStore"],
views:
[
"home.ActionItemDetailsPanel",
"home.ActionItemGrid",
"home.HomeScreen"
],
init: function () {
this.control({
"#homescreen": {
beforerender: this.loadActionItems
},
"ActionItemsGrid": {
itemclick: this.displayDetails
}
});
},
displayDetails: function (model, record) {
this.getDetailsPanel().loadRecord(record);
},
loadActionItems: function () {
var store = Ext.getStore("myActionStore");
store.load();
this.getActionItemsGrid().reconfigure(store);
}
});
View
Ext.define("myApp.view.home.ActionItemDetailsPanel", {
extend : "Ext.form.Panel",
xtype: "actionitemdetails",
items: [
{
xtype: "fieldset", defaults: { xtype: "textfield", disabled: true },
items: [
{
xtype: 'label',
forId: 'pri',
text: 'My Priority',
margin: '0 0 0 10'
},
{ id: "pri", fieldLabel: "Priority" },
{ id: "request", fieldLabel: "Requested Time" }
]
}
]
});
I found the solution from Condor a while ago. http://www.sencha.com/forum/showthread.php?106256-Form-Panel-Load-Record-and-show-the-data-in-form-label
The gist of it is that label is not a field. So in order to do what I want I need an xtype: 'displayfield' with the name of the field I want.
{
xtype: 'displayfield',
name: 'pri',
text: 'My Priority',
margin: '0 0 0 10'
}

Sencha touch list itemtap after view change

In sencha touch application I got views, one of them contains a list.
If I switch from the view which contains the list to another view and back, the list itemtap event not fires again.
My view with the list:
Ext.define('app.view.ItemList', {
extend: 'Ext.navigation.View',
xtype: 'listitems',
config: {
title: 'List',
items: [
{
xtype: 'toolbar',
ui: 'light',
docked: 'top',
title: 'List',
items: [
{
xtype: 'button',
text: 'Back',
ui: 'back',
handler: function() {
Ext.Viewport.animateActiveItem({xtype:'main'}, {type:'slide'});
}
},
]
},
{
xtype: 'list',
itemTpl: '{"name"}',
store: {
autoLoad: true,
fields: ['name', 'email'],
proxy: {
type: 'rest',
url: 'data/data.json',
reader: {
type: 'json'
}
}
}
}]
},
initialize: function() {
this.callParent();
}
})
Controller for this:
Ext.define('app.controller.Main', {
extend: 'Ext.app.Controller',
config: {
refs: {
listitems: 'listitems'
},
control: {
'listitems list': {
itemtap: 'showItem',
}
}
},
showItem: function(list, index, element, record) {
this.getItemlist().push({
xtype: 'panel',
title: record.get('name'),
html: [
"<b>Name:</b> " + record.get('name') +
"<b>Email:</b> " + record.get('email')
],
scrollable: true,
styleHtmlContent: true
})
}
})
I tried it also with id, itemId, nothing worked.
How could I solve this?
Please try sth like this:
this.getItemlist().push(
Ext.create('Ext.panel.Panel,{
title: record.get('name'),
html: [
"<b>Name:</b> " + record.get('name') +
"<b>Email:</b> " + record.get('email')
],
scrollable: true,
styleHtmlContent: true
})
)
and don't forget to use getItemlist().pop() when back button is clicked! In my app, the back button did not (or not always) remove the view on top of the stack. It gets even worse when adding loadmasks and ActionSheets.

Sencha Touch detailed page view into items with buttons

1.Could please anybody help me with this issue?
1.After clicking on data detail I need see something as bellow (NotesApp.view.NoteEditor):
1.button_1
1.html + {title} + html
1.button_2
1.html + {narrative} + html
app.js
Ext.application({
name: "NotesApp",
models: ["Note"],
stores: ["Notes"],
controllers: ["Notes"],
views: ["NotesList", "NoteEditor"],
launch: function () {
var notesListView = {
xtype: "noteslistview"
};
var noteEditorView = {
xtype: "noteeditorview"
};
Ext.Viewport.add([notesListView, noteEditorView]);
}
});
NotesApp.model.Note
Ext.define("NotesApp.model.Note", {
extend: "Ext.data.Model",
config: {
idProperty: 'id',
fields: [
{ name: 'id', type: 'int' },
{ name: 'title', type: 'string' },
{ name: 'narrative', type: 'string' }
]
}
});
NotesApp.store.Notes
Ext.define("NotesApp.store.Notes", {
extend: "Ext.data.Store",
config: {
model: "NotesApp.model.Note",
data: [
{ title: "Ibuprofen STDATA 200", narrative: "LIEK"},
{ title: "Ibuprofen STDATA 450", narrative: "LIEK"},
{ title: "IbuprofANIN", narrative: "LATKA"}
]
}
});
NotesApp.controller.Notes
Ext.define("NotesApp.controller.Notes", {
extend: "Ext.app.Controller",
config: {
refs: {
notesListView: "noteslistview",
noteEditorView: "noteeditorview",
notesList: "#notesList"
},
control: {
notesListView: {
editNoteCommand: "onEditNoteCommand"
},
noteEditorView: {
backToHomeCommand: "onBackToHomeCommand"
}
}
},
slideLeftTransition: { type: 'slide', direction: 'left' },
slideRightTransition: { type: 'slide', direction: 'right' },
activateNoteEditor: function (record) {
var noteEditorView = this.getNoteEditorView();
noteEditorView.setRecord(record);
Ext.Viewport.animateActiveItem(noteEditorView, this.slideLeftTransition);
},
activateNotesList: function () {
Ext.Viewport.animateActiveItem(this.getNotesListView(), this.slideRightTransition);
},
onEditNoteCommand: function (list, record) {
this.activateNoteEditor(record);
},
launch: function () {
this.callParent(arguments);
var notesStore = Ext.getStore("Notes");
notesStore.load();
},
init: function () {
this.callParent(arguments);
}
});
NotesApp.view.NotesList
Ext.define("NotesApp.view.NotesList", {
extend: "Ext.Container",
requires:"Ext.dataview.List",
alias: "widget.noteslistview",
config: {
layout: {
type: 'fit'
},
items: [{
xtype: "toolbar",
title: "Liek",
docked: "top",
}, {
xtype: "list",
store: "Notes",
itemId:"notesList",
onItemDisclosure: true,
itemTpl: "<div>{title}</div><div>{narrative}</div>"
}],
listeners: [ {
delegate: "#notesList",
event: "disclose",
fn: "onNotesListDisclose"
}]
},
onNotesListDisclose: function (list, record, target, index, evt, options) {
console.log("editNoteCommand");
this.fireEvent('editNoteCommand', this, record);
}
});
NotesApp.view.NoteEditor
Ext.define("NotesApp.view.NoteEditor", {
extend: "Ext.Container",
requires:"Ext.dataview.List",
alias: "widget.noteeditorview",
initialize: function () {
this.callParent(arguments);
},
config: {
// this is working !!!
// tpl: [
// '<div><p>Info about: {title} </p></div>'
// ],
items: [
{
xtype: "button",
text: '<div style="text-align:left;">button 1<div>',
ui: "action",
id:"button_1"
},
{
xtype: 'list',
itemTpl: [
'<div>title: {title} </div>' // working not !!!
]
},
{
xtype: "button",
text: '<div style="text-align:left;">button 2<div>',
ui: "action",
id:"button_2"
},
{
xtype: 'list',
itemTpl: [
'<div>title: {narrative} </div>' // working not !!!
]
}
]
},
});
in your controller, you attach the onEditNoteCommand handler to the editNoteCommand. This is not a valid event (and is never triggered) of the Ext.dataview.List object as you can see in the Sencha documentation.
You have to attach the handler to an existing event, in this case to the itemtap one:
control: {
notesListView: {
itemtap: "onEditNoteCommand"
},
...
Problem
You created NotesApp.view.NoteEditor as list, within that list you have two separate list for title and narrative and But in controller you setting data only for NoteEditor list, not for two list within NoteEditor, so that two list will not show any data because they didn't get data.
Can do like this
In view
Give itemId for that two list.
{
xtype: 'list',
itemId : 'title',
itemTpl: [
'<div>title: {title} </div>' // working not !!!
]
},
{
xtype: "button",
text: '<div style="text-align:left;">button 2<div>',
ui: "action",
id:"button_2"
},
{
xtype: 'list',
itemId : 'narrative',
itemTpl: [
'<div>title: {narrative} </div>' // working not !!!
]
}
In controller
activateNoteEditor: function (record) {
var noteEditorView = this.getNoteEditorView();
noteEditorView.getComponent('title').setData(record.getData().title);
noteEditorView.getComponent('narrative').setData(record.getData().narrative);
Ext.Viewport.animateActiveItem(noteEditorView, this.slideLeftTransition);
},
What you trying to do ?
First of all NotesApp.view.NoteEditor is to edit note with two fields for title and narrative.
Why you have two list for title and narrative ?
What is the purpose of that list in edit screen ?

Sencha Touch - Redirect to another view

I am building a Sencha Touch application and struggling with redirecting or changing another view after login. After login i need to take it to Home Page. But my below code in Login Controller's authenticateUser()not working.
Tried with Ext.Viewport.push(homePanel) , Ext.Viewport.setActiveItem(homePanel) also. But nothing works.
LoginView
Ext.define("Mobile.view.LoginView", {
extend: "Ext.form.FormPanel",
alias: "widget.mylogin",
id: 'loginFormPanel',
config: {
name: 'loginform',
frame: true,
url: 'login/Authenticate',
title: 'Login',
items: [
{
xtype: 'fieldset',
itemId: 'LoginFieldset',
margin: '10 auto 0 auto ',
title: '',
items: [
{
//User Name field def
},
{
//Pwd Field Def
}
]
},
{
xtype: 'button',
id: 'loginButton',
text: 'Login',
action: 'login'
}
]
}
});
Login Controller
Ext.define("Mobile.controller.LoginController", {
extend: "Ext.app.Controller",
views: ['LoginView', 'HomeView'],
models: ['UserModel'],
config: {
refs: {
loginForm: "#loginFormPanel"
},
control: {
'button[action=login]': {
tap: "authenticateUser"
}
}
},
authenticateUser: function (button) {
loginForm.submit({
method: 'POST',
success: function (form, result) {
//THIS IS NOT WORKING
Ext.Viewport.add(Ext.create('Mobile.view.HomeView'));
},
failure: function (form, result) {
console.log('Error');
Ext.Msg.alert('Check the logic for login and redirect');
}
});
}
});
Home View
Ext.define('Mobile.view.HomeView', {
extend: 'Ext.Container',
id: 'homescreen',
alias: "widget.homepanel",
config: {
layout: {
type: 'card',
animation: {
type: 'flip'
}
},
items: [
{
xtype: 'toolbar',
docked: 'bottom',
id: 'Toolbar',
title: 'My App',
items: [
{
id: 'settingsBtn',
xtype: 'button',
iconCls: 'settings',
ui: 'plain',
iconMask: true
}
]
},
{
xclass: 'Mobile.view.ActionListView'
}
]
},
});
App.JS
Ext.application({
name: "Mobile",
controllers: ["LoginController", "HomeController"],
views: ['LoginView', 'HomeView', 'ActionListView'],
models: ['UserModel', 'OrganizationModel', 'ActionModel'],
stores: ['OrganizationStore', 'ActionStore'],
launch: function () {
var loginPanel = Ext.create('Ext.Panel', {
layout: 'fit',
items: [
{
xtype: 'mylogin'
}
]
});
Ext.Viewport.add(loginPanel);
}
});
Any one have any idea?
Already referred Load another view after login with sencha touch 2.0 . But there is no answer . Please help
You need create a ref for your HomeView:
refs: {
HomeView: {
autoCreate: true,
selector: 'HomeView',
xtype: 'HomeView'
},
}
And set this view active:
Ext.Viewport.setActiveItem(this.getHomeView());
If you use Sencha Touch 2, you should use Route to redirect to another page. So, it wil be like this:
this.redirectTo('home');
Then create a controller with has a route "home"
FOr more information about routes. http://docs.sencha.com/touch/2-0/#!/guide/controllers-section-4
Try this. may be this work.
authenticateUser: function (button) {
loginForm.submit({
method: 'POST',
success: function (form, result) {
var home= Ext.create('Mobile.view.HomeView');
Ext.getCmp('loginFormPanel').destroy();
Ext.Viewport.add(paneltab);
}

Store is undefine after extjs sdk

my mvc applications works fine. However when i run the sdk. I get store is undefined.
Below the store is defined as "Cutters" I've also tried the full name namespace "Mis.store.Cutters"
I've uploaded the whole file. all-classes.txt
here is my view "Cutter"
Ext.define('Mis.view.Cutter', { extend:'Ext.panel.Panel',
alias:'widget.Cutter',
items:[
{
border:0,
width:950,
layout:{
align:'stretch',
type:'hbox'
},
items:[
{
xtype:'gridpanel',
title:'',
id:'cutterGrid',
name:'cutterGrid',
layout:{
align:'stretch',
type:'hbox'
},
store:'Cutters',
columns:[
{
xtype:'gridcolumn',
dataIndex:'CutterNumber',
text:'Cutter',
flex:1,
sortable: true
}
],
bbar:Ext.create('Ext.PagingToolbar', {
id: 'cutterPagination',
name: 'cutterPagination',
store:'Cutters',
displayInfo:true,
displayMsg:'Displaying records {0} - {1} of {2} ',
emptyMsg:"No records to display "
}
)
}
]
}
],
initComponent:function () {
this.callParent();
}
});
app.js
Ext.Loader.setConfig({ enabled: true });
Ext.Loader.setPath('App', '/ext/Cutter/app');
Ext.application({
name: 'Mis',
appFolder: '/ext/Cutter/app',
models: [ 'Cutter', 'Project', 'CutterHistory','Job', 'Part' , 'ClientFinder'],
stores: [ 'Cutters','CutterHistories','Projects', 'Jobs', 'Parts'],
controllers: ['Cutter'],
launch: function () {
Ext.QuickTips.init();
var cmp1 = Ext.create('Mis.view.ViewCutter', {
renderTo: "mis-application"
});
cmp1.show();
}
});
"ViewCutter" this view has reference to "Cutter" which is the view i have the store undefined in.
Ext.define('Mis.view.ViewCutter', {
extend:'Ext.panel.Panel',
height:700,
id:'Cutter',
border: 0,
width:950,
layout:{
align:'stretch',
type:'vbox'
},
title:'',
requires:[
'Mis.view.Cutter',
'Mis.view.EditCutter'
],
initComponent:function () {
var me = this;
Ext.applyIf(me, {
items:[
{
xtype:'panel',
flex:1,
title:'',
items:[
{
xtype:'Cutter',
border:0,
layout:{
type:'column'
}
},
{
xtype:'EditCutter',
border:0,
layout:{
type:'column'
}
}
]
}
]
});
me.callParent(arguments);
}
});
My issue was that i had the store defined on the Pagination.
bbar:Ext.create('Ext.PagingToolbar', {
id: 'cutterPagination',
name: 'cutterPagination',
**store:'Cutters',**
displayInfo:true,
displayMsg:'Displaying records {0} - {1} of {2} ',
emptyMsg:"No records to display "
}
This didn't seem to be an issue before i use the sdk. In hindsight i wish i was using the sdk from the start.

Resources