Reputation: 95
I just created a little Homepage with Sencha Touch. Now I want use the buttons to link to another site/page. How can I do that? I don't want to use the standard Tab bar.
Ext.define('RMA-App.view.Main', {
extend: 'Ext.Container',
xtype: 'main',
requires: [
'Ext.TitleBar'
],
config: {
items: [
{
docked: 'top',
xtype: 'titlebar',
title: 'RMA-App'
},
{
xtype: 'button',
text: 'Event anlegen',
ui: 'normal',
iconCls: 'add',
iconMask: 'true',
iconAlign: 'top',
margin: '5 5 5 5'
},
{
xtype: 'button',
text: 'Events anzeigen',
ui: 'normal',
iconCls: 'list',
iconMask: 'true',
iconAlign: 'top',
margin: '5 5 5 5'
}
]
}
});
Upvotes: 1
Views: 843
Reputation: 1023
You can navigate to view with a handler
{
xtype: 'button',
text: 'Events anzeigen',
handler: function() {
var someRootContainer = Ext.ComponentQuery.query("#someRootContainer");
someRootContainer.removeAll();
someRootContainer.add(Ext.create(yourTargetView));
}
}
Upvotes: 1