refs in controller

30 views
Skip to first unread message

Jean-Marc Choulet

unread,
May 24, 2014, 10:27:10 AM5/24/14
to def...@googlegroups.com
Hello,

I'm new to Deft JS and I try to learn it.

I have a controller MyApp.controller.MyController. In this controller, we found this code :

    refs: [
        {
            ref: 'myWindow',
            selector: 'mywindow'
        }
    ],

    views: [
        ...
        'MyWindow'
    ],

    ...

    onTextfieldChange: function(field, e, options) {
        if (condition) {
            if (this.getMyWindow() === undefined) {
                Ext.widget('mywindow');
            }
            this.getMyWindow().show();
        }
        else {
            if (this.getMyWindow() !== undefined) {
                this.getMyWindow().hide();
            }
        }
    },

With refs, I can get a reference on a MyApp.view.MyWindow instance. How can I have the same think in Deft JS ViewController ?

Thanks,

Jean-Marc

Brian Kotek

unread,
May 24, 2014, 3:43:24 PM5/24/14
to deftjs
It sounds like you may want to read the documentation. https://github.com/deftjs/DeftJS/wiki/Accessing-Views


--
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/7af5e8cf-d6f5-45bd-a7b6-8972c1067c9c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages