Want to refresh the model. Howto?

vishwas.gagrani's Avatar


27 Jun, 2012 01:48 PM

I want to refresh the variables in model. For this i am calling the constructor

statsModel = new StatsModel()

in one of the many mediators of the project.

As i had guessed, it's not working. ( errenous).
What's the right way to do it then ?

  1. 1 Posted by Stray on 27 Jun, 2012 01:54 PM

    Stray's Avatar

    Hi there,

    it's not possible to 'flush' the places where the object has already been injected.

    Instead, put some kind of dispose() or reset() method on your StatsModel, and this will reset the state internally.

    Normally I use the memo pattern to do this.



  2. 2 Posted by vishwas.gagrani on 27 Jun, 2012 02:02 PM

    vishwas.gagrani's Avatar

    ok. thanks.

  3. vishwas.gagrani closed this discussion on 27 Jun, 2012 02:09 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac