Results 1 to 3 of 3

Thread: ViewController init for modern toolkit

    You found a bug! We've classified it as EXTJS-18737 . We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
  1. #1
    Sencha Premium User
    Join Date
    Oct 2011
    Location
    Paris
    Posts
    21

    Default ViewController init for modern toolkit

    Hi there,

    I am trying to setup a modern toolkit panel with a ViewController. The ViewController init method is supposed to run after the view initialization
    http://docs.sencha.com/extjs/6.0/6.0...er-method-init
    but there is no initComponent in the toolkit and the initialize method of the view is called after the controller.

    Can you please explain the lifecycle for the modern toolkit?

    Thanks
    Philippe

  2. #2
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,449

    Default

    Different classes fire the VC's init method than does fire the initialize method. Ext.Widget fires the VC's init method but Ext.Component (which is a subclass of Ext.Widget) fires the initialize method. This is kind of odd that there are two starters for components like this. IMO Ext.Widget is touted to be a lightweight component that can be cloned/replicated quickly and so a ViewController shouldn't really be placed on it. I'm going to open an improvement for this to see what the team feels about the location of these two and to get them closer inline with the classic toolkit.
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Fullstack Engineer
    ________________
    Modus Create is based on the model of an open source team. We’re a remote, global team of experts in our field. To find out more about the work we do, head over to our website.

    Check out my GitHub:
    https://github.com/mitchellsimoens

  3. #3
    Sencha Premium User
    Join Date
    Oct 2011
    Location
    Paris
    Posts
    21

    Default

    Thanks for your feedback.

    My component is a panel which contains a list of items ( Ext.dataview.DataView for modern and Ext.view.View for classic ). The VC initializes the store and as a workaround I exposed an initView method in each view to apply it to the lists.
    Do you see any drawback in this approach?

Similar Threads

  1. Tree in Modern toolkit
    By wbabich in forum Ext JS 6.x Q&A
    Replies: 3
    Last Post: 13 Oct 2015, 6:35 AM
  2. web sql proxy dropped in modern toolkit
    By EPV in forum Ext JS 6.x Q&A
    Replies: 2
    Last Post: 10 Jul 2015, 12:35 AM
  3. [DUP] Cannot submit form in modern toolkit
    By movys in forum Ext JS 6.x Bugs
    Replies: 2
    Last Post: 2 Jul 2015, 5:40 PM
  4. Form with Buttons in the Modern toolkit
    By wbabich in forum Ext JS 6.x Q&A
    Replies: 3
    Last Post: 2 Jul 2015, 6:28 AM
  5. Ext.Promise on modern toolkit only??
    By chanand in forum Ext JS 6.x Q&A
    Replies: 3
    Last Post: 17 Jun 2015, 8:48 PM

Posting Permissions

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