Page 2 of 2 FirstFirst 12
Results 11 to 17 of 17

Thread: How to successfuly implement views on MVC application

  1. #11
    Sencha User
    Join Date
    Oct 2011
    Location
    Vancouver, Canada
    Posts
    157
    Answers
    5

    Default

    If you have single-instance controller, and multiple instances of view, then a controller can never have a reference to a view.

    How do you load a model into a form if you don't have a reference to the view?

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

    Default

    Sure it can get a reference. Controllers are really view-controllers so an event from a view can take action on another view via ComponentQuery.
    Mitchell Simoens @LikelyMitch

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

    Posts are my own, not any current, past or future employer's.

  3. #13
    Sencha User
    Join Date
    Oct 2011
    Location
    Vancouver, Canada
    Posts
    157
    Answers
    5

    Default

    Yes, it can get a reference inside an event listener, but it cannot hold an instance-level reference to a model or view, as there is only one controller instance and could be many view instances.

    Is it possible to provide some basic sample code as to how to load a form with a model using MVC when there can be multiple instances of a view?

  4. #14
    Sencha Premium User bluehipy's Avatar
    Join Date
    Mar 2010
    Location
    Romania
    Posts
    628
    Answers
    67

    Default

    Provide me a criteria for differentiating the views instances and I will provide you the sample code.

  5. #15
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,379
    Answers
    3997

    Default

    To be honest this has come up a couple times so if we can work together to come up with a concise example that is teachable I'm all for putting in the effort.
    Mitchell Simoens @LikelyMitch

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

    Posts are my own, not any current, past or future employer's.

  6. #16
    Sencha User
    Join Date
    Oct 2011
    Location
    Vancouver, Canada
    Posts
    157
    Answers
    5

    Default

    I actually called your head office to buy a support subscription, but after the receptionist routed me, no one answered...

  7. #17
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,379
    Answers
    3997

    Default

    Quote Originally Posted by el_chief View Post
    I actually called your head office to buy a support subscription, but after the receptionist routed me, no one answered...
    I'm being told our phone system is having issues right now. You can email our sales at [email protected] . If you still get no reply you can email me directly [email protected] and I will raise some hell in order to make sure you get answered but I am firmly confident that [email protected] will help you.
    Mitchell Simoens @LikelyMitch

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

    Posts are my own, not any current, past or future employer's.

Page 2 of 2 FirstFirst 12

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
  •