0
votes

The following is the structure of my Sencha Touch Application. I have a view and I have given xtype "homepage" to it. In the homepage view I have the following items.

A toolbar docked at the top. A list in the left side of the application On the Right Side, I have a view with some display whose id is "display"

Problem: Now I want that when I click different options in the list, different views should be displayed on the right side of the homepage.

I am able to call list-item-tap function in controller and I am able to identify different items of the list. Only problem is that I am not able to replace the given display with another view

1

1 Answers

0
votes

Okay, after searching a bit on the net, I found the following solution. I should use layout:'card' to the container in which I need to be changing views. In my case it is a container with id display.

Then in Controller.js I should write the following code:

        var item = Ext.ComponentQuery.query("#display")[0];
        item.setActiveItem({xtype:'xtype_of_your_view'});