-
21 Aug 2012 7:50 AM #1
Unanswered: Child Views displaying on TabBar
Unanswered: Child Views displaying on TabBar
I've been working on upgrading a Sencha 1.0 site to 2.0. I've used several examples as a guide to get this done. It was originally patterned after the geocongress application. One thing I just noticed is that when I move from a main screen to a child screen a "blank" tab button shows up on my tab bar. I'm sure I'm not doing this correctly but not sure how I should be.
The following is the code I'm using in my controller.
This are the screens I'm seeing.PHP Code:, onListFilingTap: function (view, index, node, e) {
//-- get record values
var rec = view.getStore().getAt(index).data;
var frmFiling = Ext.getCmp('filingDetail');
var sTitle = rec.ControlNo + '-' + rec.ItemNo;
var sRecID = rec.RecID;
//-- get set view
if (frmFiling) {
frmFiling.setData(rec);
Ext.getCmp('viewport').setActiveItem(frmFiling);
} else {
Ext.getCmp('viewport').setActiveItem({
xclass: 'PUCTXMobile.view.FilingsDetail'
//, data: rec
});
}
Ext.getCmp('tbarFilingDetail').setTitle(sTitle);
Ext.getCmp('pnlFilingDetail').setData(rec);
}
NormalScreen.pngBadScreen.png
Anyone know what is causing this?
-
21 Aug 2012 3:56 PM #2
It seems like it is the active tab.
Is this the code you use to create and show the page shown in the 2nd image?
-
21 Aug 2012 4:40 PM #3
In my code I'm calling the setActiveItem method to show the child page. Does this method cause what is happening? The TabBar responds to this? Is there another way to show the child page? I've gotten code from the various examples from sencha and on the web so I could be using it out of context but is so what is the proper way to do this?
-
21 Aug 2012 6:33 PM #4
I'm just trying to get a better understanding of what is going on to get to what is happening. It's hard to find solutions or pinpoint issues without a workable demo or example

So you are in the Filings page. Then you tap on one of the list items and it brings you to that detail page? You may be using it out of context but I can't say for sure because I don't have your entire code. You can either include more of your code, or read below:
If you are adding the detail page to the tabBar or the tabPanel itself, it will create that tab that is shown. You can try creating a popup panel to show the details when the list item is tapped, or have the Filings panel use a layout: 'card' and then add the detail page to the Filings panel, instead of the tabPanel. Then you could use setActiveItem to transition and everything should be dandy.


Reply With Quote