Injecting proxies into mediators is bad practice. (Application state is exposed for change from View, without triggering Controller)
.. but sometimes you still want to do it. (to same time is some specific applications)
I want to disable Proxy injection into mediators by default. - if you try to do it - you will get error.
You still can enable proxy injection into mediator - but you will have to explicitly set it:
proxyMap.map(new MyProxy(), null, null, MyProxy);
This will enable you to inject MyProxy into mediators.
proxyMap.map(new MyProxy(), null, null, IMyProxy);
This is even better practice, it will enabel you to inject MyProxy as IMyProxy into mediators. (that contains get data only functions)
With this you will not be able to inject, or get MyProxy in mediators. If you try - you will get Error.
#54 Proxies will be protected from injection into mediators, unless y…
…ou implicitly allow the proxy to be injected.