-
23 Nov 2011 4:48 AM #1
Best approach to structuring an Ext.Panel
Best approach to structuring an Ext.Panel
Hi Guys,
I would just like to hear your views about the best approach to 'design' or 'structure' Ext.Panels.
Basically what I have is a js file containing various new Ext.Panels and an Ext.List.
To get the List and the first panel to render together I added them as items to the Panels items array. However, the examples I see on the internet for the 'onItemDisclosure' of the list and its back button ... they are just using 'card' layout, which means my approach will not work as I have multiple objects/items contained in the one Panel.
So, my question is this:
Should I have just one 'card' layout and design the layout of the content via HTML? Or Is there another approach to navigating back via the back button?
I can provide code samples if necessary
Thanks
Whiplash
-
23 Nov 2011 8:01 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,619
- Vote Rating
- 434
Think about it... you tap on something and it goes forward in your app... you hit the back button and it goes back... what do you envision. I envision something like using card layout.
Not knowing what version of Sencha Touch you are referring to, I will just assume you mean ST1...
Now you will only see one panel at a time within the panel that has layout: 'card'Code:new Ext.Panel({ fullscreen : true, layout : 'card', cardSwitchAnimation : 'slide', items : [ { xtype : 'panel', html : 'First Card }, { xtype : 'panel', html : 'Second Card } ] });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.
-
24 Nov 2011 1:49 AM #3
thanks for the reply
thanks for the reply
Hi
thanks for the reply but I don't think you understood what I meant.
See I had an Ext.Panel with a title and count total and an Ext.List obviously for a list of objects ... and wanted the two rendered together ...
but the card layout can only render one object/item at a time.
It's grand now though as I have found an example that uses the viewport with a card layout, which then allows you to add a Panel and a List
thanks for the reply though



Reply With Quote