Results 1 to 3 of 3

Thread: Shared ViewModel

  1. #1

    Default Shared ViewModel

    I have 2 views, one grid and detailed view (form). The data is loaded into a store and viewmodel is attached to a grid. I would like to reuse the viewmodel for the detailed view which will have only one record that I could view/edit/delete.

    I want to make sure that there is only one request for the data.

    What is the best approach for this or best practise? Are there any examples?
    http://www.dev4.life - Software Development Blog

  2. #2
    Sencha Premium Member EPV's Avatar
    Join Date
    Dec 2010
    Location
    Sweden
    Posts
    361
    Answers
    37

    Default

    Here's a quick example of MVVM:
    https://fiddle.sencha.com/#view/editor&fiddle/1qn8

    Good luck / E

  3. #3

    Default

    Thanks... I got it working using links..

    Here is the example I used..

    http://examples.sencha.com/extjs/6.2...-child-session
    http://www.dev4.life - Software Development Blog

Similar Threads

  1. [OPEN] Child viewModel saves undeclared bind attributes on root viewmodel
    By robboerman in forum Ext JS 6.x Bugs
    Replies: 3
    Last Post: 12 Sep 2017, 2:31 AM
  2. Child ViewModel leak to parent's ViewModel
    By SebTardif in forum Ext JS 6.x Bugs
    Replies: 5
    Last Post: 15 Nov 2016, 2:50 PM
  3. Replies: 2
    Last Post: 1 Feb 2015, 4:04 PM

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
  •