How to use the alloy.createController function in alloy

To help you get started, we’ve selected a few alloy examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github CBMVC / CBMVC-Library-For-Titanium-Alloy / app / lib / core.js View on Github external
CB.setupDatabase();

		// Init cache object
		CB.Cache.init();

		// Init utility object
		CB.Util.init(content.index);

		// The main content
		CB.MainContent = content.main;

		// The main content copy
		CB._mainContent = content.main;

		// Get the current controller
		CB._currentController = Alloy.createController(Alloy.CFG.firstController);
	},
	/**
github appcelerator / alloy / test / apps / testing / ALOY-609 / _generated / windows / alloy / controllers / index.js View on Github external
$.__views.toolbar = Ti.UI.createView({
        height: "50dp",
        width: "100%",
        bottom: 0,
        layout: "horizontal",
        id: "toolbar"
    });
    $.__views.index.add($.__views.toolbar);
    $.__views.__alloyId29 = Alloy.createController("button", {
        label: "reset",
        id: "__alloyId29",
        __parentSymbol: $.__views.toolbar
    });
    $.__views.__alloyId29.setParent($.__views.toolbar);
    doButtonClick ? $.__views.__alloyId29.on("buttonClick", doButtonClick) : __defers["$.__views.__alloyId29!buttonClick!doButtonClick"] = true;
    $.__views.__alloyId30 = Alloy.createController("button", {
        label: "template1",
        id: "__alloyId30",
        __parentSymbol: $.__views.toolbar
    });
    $.__views.__alloyId30.setParent($.__views.toolbar);
    doButtonClick ? $.__views.__alloyId30.on("buttonClick", doButtonClick) : __defers["$.__views.__alloyId30!buttonClick!doButtonClick"] = true;
    $.__views.__alloyId31 = Alloy.createController("button", {
        label: "template2",
        id: "__alloyId31",
        __parentSymbol: $.__views.toolbar
    });
    $.__views.__alloyId31.setParent($.__views.toolbar);
    doButtonClick ? $.__views.__alloyId31.on("buttonClick", doButtonClick) : __defers["$.__views.__alloyId31!buttonClick!doButtonClick"] = true;
    $.__views.__alloyId32 = Alloy.createController("button", {
        label: "template3",
        id: "__alloyId32",
github appcelerator / alloy / test / apps / testing / ALOY-846 / _generated / android / alloy / controllers / testwindow.js View on Github external
$.testwin.addEventListener("click", function() {
        Alloy.Globals.detail_navGroup.open(Alloy.createController("detailWin").getView(), {
            animated: true
        });
    });
    _.extend($, exports);
github appcelerator / alloy / test / apps / testing / ALOY-695 / _generated / mobileweb / alloy / controllers / index.js View on Github external
function openFooBar() {
        Alloy.createController("foo/bar").getView().open();
    }
    require("alloy/controllers/BaseController").apply(this, Array.prototype.slice.call(arguments));
github appcelerator / alloy / samples / apps / advanced / proxy_property_requires / _generated / blackberry / alloy / controllers / index.js View on Github external
});
    $.__views.bindingWindow.add($.__views.bindingTable);
    var __alloyId28 = Alloy.Collections["dummy"] || dummy;
    __alloyId28.on("fetch destroy change add remove reset", __alloyId29);
    $.__views.bindingTab = Ti.UI.createTab({
        window: $.__views.bindingWindow,
        id: "bindingTab",
        title: "binding"
    });
    $.__views.index.addTab($.__views.bindingTab);
    $.__views.proxiesWindow = Ti.UI.createWindow({
        backgroundColor: "#fff",
        id: "proxiesWindow",
        title: "proxy properties"
    });
    $.__views.__alloyId36 = Alloy.createController("proxy", {
        id: "__alloyId36"
    });
    var __alloyId37 = [];
    $.__views.__alloyId38 = Ti.UI.createTableViewRow({
        height: "50dp",
        title: "stuff",
        id: "__alloyId38"
    });
    __alloyId37.push($.__views.__alloyId38);
    $.__views.__alloyId39 = Ti.UI.createTableViewRow({
        height: "50dp",
        title: "stuff",
        id: "__alloyId39"
    });
    __alloyId37.push($.__views.__alloyId39);
    $.__views.__alloyId40 = Ti.UI.createTableViewRow({
github CBMVC / CBMVC-Library-For-Titanium-Alloy / app / lib / core.js View on Github external
getCurrentController: function(data) {
		if(CB._currentController === undefined) {
			CB._currentController = Alloy.createController(Alloy.CFG.firstController, data || {});
		}

		return CB._currentController;
	},
	/**
github tipsy-and-tumbler-ltd / TripLogr / Resources / iphone / alloy / controllers / Map.js View on Github external
function openManualEntry() {
        var modal = Alloy.createController("ManulEntry");
        modal.getView().open({
            modal: true
        });
    }
    require("alloy/controllers/BaseController").apply(this, Array.prototype.slice.call(arguments));
github dreamfactorysoftware / titanium-sdk / Resources / iphone / alloy / controllers / group_show.js View on Github external
addBtn.addEventListener("click", function() {
        var args = {
            group_id: group_id
        };
        Alloy.createController("contact_add", args);
    });
    var search = Ti.UI.createSearchBar({
github appcelerator / titanium_mobile_windows / Examples / Corporate / src / Assets / alloy / controllers / profile.js View on Github external
$.phone.text = _args.phone;
    $.email.text = _args.email;
    $.im.text = _args.im || _args.firstName + "." + _args.lastName;
    var lat = _args.latitude;
    $.mapview.setRegion({
        latitude: lat || 30.631256,
        longitude: _args.longitude || -97.675422,
        latitudeDelta: 2,
        longitudeDelta: 2,
        zoom: 5,
        tilt: 45
    });
    var mapAnnotation = Map.createAnnotation({
        latitude: _args.latitude || 30.631256,
        longitude: _args.longitude || -97.675422,
        customView: Alloy.createController("annotation", {
            image: _args.photo
        }).getView(),
        animate: true
    });
    $.mapview.addAnnotation(mapAnnotation);
    bookmarks = Ti.App.Properties.getList("bookmarks", []);
    isBookmark(_args.id) && $.addBookmarkBtn.setTitle("- Remove From Bookmarks");
    Ti.Analytics.featureEvent("windows.profile.viewed");
    $.profile.addEventListener("postlayout", function() {
        $.profile.animate({
            opacity: 1,
            duration: 250,
            curve: Ti.UI.ANIMATION_CURVE_EASE_IN_OUT
        });
    });
    __defers["$.__views.addBookmarkBtn!click!toggleBookmark"] && $.__views.addBookmarkBtn.addEventListener("click", toggleBookmark);
github appcelerator / alloy / samples / apps / advanced / master_detail / _generated / blackberry / alloy / controllers / index.js View on Github external
$.master.on("detail", function(e) {
        var controller = Alloy.createController("detail");
        {
            controller.getView();
        }
        controller.setBoxerStats(e.row.fighterName);
    });
    $.index.open();