Results 1 to 2 of 2

Thread: Calling Views

  1. #1
    Sencha User
    Join Date
    Apr 2014
    Posts
    1

    Default Calling Views

    Hi All,

    I'm new to ExtJS.
    In my application I do have 3 views. I'm changing the Views to a Viewport
    using the following lines of code.

    Ext.getCmp('myViewport').removeAll();
    Ext.getCmp('myViewport').add(Ext.create('MyProject.view.Dashboard'));
    Ext.getCmp('myViewport').doLayout();


    Is this the actual way of displaying view to a Viewport?
    Also I'm confused if the last line of code[Ext.getCmp('myViewport').doLayout();] is actually required?

    Please help.

  2. #2
    Ext JS Premium Member
    Join Date
    Jul 2011
    Location
    Hyderabad, India
    Posts
    99
    Answers
    15

    Default

    Yes, you are right. Just remove the doLayout() line as ExtJs does it internally.

    Reference: doLayout()

    T
    hanks,
    Md Naveed
    \m/

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •