PDA

View Full Version : Navigation from one view to another view



AJAIN32
15 Sep 2014, 7:13 AM
Hi All,

I am stuck while navigating one view to another view. what i am doing -

i am rendering viewport in a div of index.html file for which id is whitespace

on click of a button -
var viewToLoad = Myapp.view.otherview.create();
Ext.fly('whitespace').update('');
viewToLoad.render('whitespace');

Ideally it should clear the viewport content and render the new view but it is appending the second view down to the first view.

Please help !!

Suggest some possible ways to do navigation effectively.

Thanks,
Ankit

scottmartin
16 Sep 2014, 1:31 PM
>>> i am rendering viewport in a div

Viewport is meant for the entire body and have 1 instance per app. You should try with a panel/container.

AJAIN32
16 Sep 2014, 11:20 PM
Thanks for replying !!

So do we require to include all the components/views of our app in viewport and navigating it by show/hide methode.

or is there any other way to render the components in a div available in index.html ??

Please suggest !!

Thanks,
Ankit