Sencha touch 2/ app workflow with navigation view

Posted by eplatonov on Stack Overflow See other posts from Stack Overflow or by eplatonov
Published on 2012-04-09T16:44:36Z Indexed on 2012/04/10 5:30 UTC
Read the original article Hit count: 282

Filed under:

I am trying to understand how can I implement the same functionality which provides navigation view in sencha touch 2, but .... Each item of the 'Ext.NavigationView' component should have it's own unique set of 'navigationBar' elements. I mean set of buttons, for example.

I know that I can do something like this:

this.getMain().getNavigationBar().rightBox.removeAll();
this.getMain().getNavigationBar().rightBox.add(this.getSettingButton());
        //where 'getSettingButton' predefined by me a button

And do this action each time when 'push' event happens (clear 'navigationBar' and add appropriate set of buttons)

Of course, I even can implement 'Ext.Panel' with 'layout: card' and set of 'Ext.panel' elements in the 'items' property, each of which will be have unique 'toolbar'. To control the behavior I can use 'setActiveItem' method.

But, I think each of these approaches is a bit weird, isn't it?

I expected that would be much more natural approach to implement it.

Most likely I don't know what I need. Confirm my doubts. What is the best way to do it.

© Stack Overflow or respective owner

Related posts about sencha-touch-2