2012-06-04 85 views
1

通过默认列表中没有标题栏的,但是当我以这样的方式创建列表它有一个空的标题栏的如何在列表中隐藏titleBar?

Ext.define('Application.view.RecipeList', { 
    extend: 'Ext.List', 
    xtype: 'recipelist', 
    requires: ['Application.store.Recipes'], 
    id:'list', 
    config: {    
     grouped: true, 
     itemTpl: '{title}', 
     store: 'Recipes', 
     onItemDisclosure: true 
    } 
}); 

有人可以帮助我了解如何隐藏标题栏的?

+0

它真的是你的应用程序中的所有东西吗? –

回答

0

空栏实际上是您的导航栏。

如果你想隐藏它,你只需要设置navigationBarfalsemainpanel

更新

config: { 
    navigationBar: false, 
    items: [{ 
     xtype: 'recipelist', 
    }] 
} 

更新

这里是如何添加搜索栏的您的导航栏

this.getMain().getNavigationBar().add({ 
    xtype: 'searchfield', 
    itemId:'contact_search', 
    placeHolder: 'Search....', 
    listeners: { 
     scope: this, 
     clearicontap: this.onSearchClearIconTap, 
     keyup: this.onSearchKeyUp 
    } 
}); 

但是当你切换到明细卡时你需要隐藏它,但我会让你弄清楚如何做到这一点。

+0

结果相同http://www.senchafiddle.com/#4hKD8#uZlr7#JywGI#3D6PK#DOaF9#NcOoQ#FduGS –

+0

查看我更新的答案。但是,那么您再也没有导航栏了,因此您无法从细节面板返回。所以,我建议你把你的搜索栏,并在导航栏中放置一个搜索栏。 –

+0

我也想过了,但我在控制器main.js中添加了一个搜索字段,是否可以将其添加到导航视图? –