-
3 Apr 2012 9:08 PM #1
Unanswered: Sencha Touch XType
Unanswered: Sencha Touch XType
SO I am building my first Sencha Touch App and I am having a problem with rendering a Panel that I have defined.
Login.js
Home.jsCode:Ext.define("Blog.view.Login", { extend:'Ext.form.Panel', requires : ['Ext.form.FieldSet', 'Ext.field.Email', 'Ext.field.Password'], xtype: 'loginpanel', config:{ scrollable:true, title: "Log In", items:[ { html:"<center><h1>Ok</h1></center>", styleHtmlContent:true }, { xtype:'fieldset', items:[ { xtype:'emailfield', name:'email', placeHolder:'E-Mail' }, { xtype:'passwordfield', name:'password', placeHolder:'Password' } ] }, { xtype:'button', text:'Log In', style:{ marginBottom:'20px' } }, { xtype:'button', text:'Sign Up' } ] }});
app.jsCode:Ext.define("Blog.view.Main", { extend:'Ext.Container', config:{ items:[ { xtype :'loginpanel' } ] }});
I did some research already and someone suggested to useCode:views: ['Main', 'Login'],
alias: 'widget.loginpanel'I tried it but it still did not work. Does anyone have any solution to this?
I have posted this on stackoverflow as well. The code is better formatted there
http://stackoverflow.com/questions/1...ng-as-expected
-
3 Apr 2012 10:03 PM #2
Here is my guess
Here is my guess
In your app.js
I'm still learning - so it's just a guess on my part.Code:launch: function(){ Ext.Viewport.add(Ext.create('Blog.view.Main')); }
Hope this help
JRS
-
3 Apr 2012 10:09 PM #3
-
3 Apr 2012 10:16 PM #4
Do you get any errors in your browser console?
Do you get any errors in your browser console?
Are you getting any errors in your browser console?
-
3 Apr 2012 10:18 PM #5
-
27 Dec 2012 11:53 AM #6
When defining your panel add fullscreen: true after scrollable: true. That way it will render it to your screen. You you don't want it to take the full space then explicitly define the height and width fo your panel.
-
27 Dec 2012 7:02 PM #7
Because you defined the class 'Blog.view.Main' in the file 'Home.js' instead of 'Main.js' so Sencha couldn't load the file 'Main.js' as you declared in the app.js "views: ['Main', 'Login']". Rename Home.js to Main.js to resolve that problem


Reply With Quote