Defjs 5 - inject only works with 'Deft.mvc.ViewController',

113 views
Skip to first unread message

Oscar Orduz

unread,
Sep 15, 2014, 12:28:05 PM9/15/14
to def...@googlegroups.com
Hi,

I'm very new with defjs and I'm working with Extjs 5, I'm trying to include Defjs and everything is fine but the 'inject' annotation only works with derived controllers of   'Deft.mvc.ViewController'. I don't know if I have to make some other change to the classes with no explicit extend.

Thanks

Brian Kotek

unread,
Sep 15, 2014, 1:05:06 PM9/15/14
to deftjs
You probably aren't applying the Injectable mixin. This change is described in last section of this wiki page: https://github.com/deftjs/DeftJS5/wiki/Key-Changes-in-Deft-JS-5

The Deft ViewController automatically has this mixin applied, which is why you don't need to do it yourself in this case. For any other class, you'll need to apply the mixin.

--
Deft JS home page: http://deftjs.org/
Wiki: https://github.com/deftjs/DeftJS/wiki
For rules and tips on asking questions on the Deft JS mailing list: https://github.com/deftjs/DeftJS/wiki/Asking-Questions-on-the-Mailing-List
---
You received this message because you are subscribed to the Google Groups "Deft JS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to deftjs+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/deftjs/a9fb94ce-eff6-4236-a09c-7ef719918663%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Oscar Orduz

unread,
Sep 16, 2014, 12:55:16 PM9/16/14
to def...@googlegroups.com
Thank Brian:
It works, but I have to add the constructor becouse some property getting null:
constructor: function (config) {
        if (config == null) {
            config = {};
        }
        this.initConfig(config);
        return this.callParent(arguments);
Reply all
Reply to author
Forward
0 new messages