-
30 May 2012 5:19 AM #1
Answered: Problem with Ext.form.Panel
Answered: Problem with Ext.form.Panel
I don't undestand why formpanel is hidden!!!
Code:Ext.define('MyApp.view.MyFormPanel', { extend: 'Ext.form.Panel', config: { items: [ { xtype: 'fieldset', title: 'MyFieldSet', items: [ { xtype: 'textfield', label: 'Field' }, { xtype: 'textfield', label: 'Field' } ] } ] } });
But panel is empty!!! I don't see something on the screen. Why?
-
Best Answer Posted by mitchellsimoens
Inspect the DOM and see what's going on for you.
-
31 May 2012 5:58 PM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,710
- Vote Rating
- 436
- Answers
- 3113
Is it a child of a container or the viewport?
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
31 May 2012 11:25 PM #3
-
1 Jun 2012 4:08 AM #4Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,710
- Vote Rating
- 436
- Answers
- 3113
A direct child or nested?
I added a xtype to the form you have above and did this and it worked
Code:new Ext.navigation.View({ fullscreen : true, items : [ { xtype : 'myformpanel' } ] });Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
1 Jun 2012 4:27 AM #5
Code:Ext.define("MyApp.view.Main", { extend: 'Ext.navigation.View', requires: ['MyApp.view.Home'], alias: 'navigationview', id: 'navView', config: { items: [ { xtype: 'homepanel' } ] } })
Code:Ext.define('MyApp.view.Home', { extend: 'Ext.Panel', xtype: 'homepanel', requires: [ ], initialize: function() { this.callParent(arguments); var form = { xtype: 'formpanel', items: [ { xtype: 'textfield', name: 'name', label: 'Name' }, { xtype: 'passwordfield', name: 'password', label: 'Password' } ] }; this.add([ form ]); }, config: { title: 'Home' } })
this doesn't work. I don't see formpanel! It is hidden.
-
1 Jun 2012 4:41 AM #6Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,710
- Vote Rating
- 436
- Answers
- 3113
It's not hidden, just has no height. You either need to use a layout like fit on the MyApp.view.Home class or give the form a height.
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
1 Jun 2012 4:47 AM #7
this also doesn"t work =(((Code:var form = { xtype: 'formpanel', height: 800, items: [ { xtype: 'textfield', name: 'name', label: 'Name' }, { xtype: 'passwordfield', name: 'password', label: 'Password' } ] };
-
1 Jun 2012 5:12 AM #8Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,710
- Vote Rating
- 436
- Answers
- 3113
Inspect the DOM and see what's going on for you.
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.


Reply With Quote