Skip to content

Alloy.Widget

Widgets are self-contained components that can be easily dropped into an Alloy project.

Widgets are self-contained components that can be easily dropped into an Alloy project. They were conceived as a way to reuse code in multiple projects or to be used multiple times in the same project.

Methods #

createCollection #

Factory method for instantiating a Backbone collection of model objects.

Parameters:
NameTypeSummaryOptional
nameStringNo
argsObjectYes

Returns: Backbone.Collection — Backbone collection object.

createController #

Factory method for instantiating a controller.

Parameters:
NameTypeSummaryOptional
nameStringNo
argsObjectYes

Returns: Object — Alloy controller object.

createModel #

Factory method for instantiating a Backbone Model object.

Parameters:
NameTypeSummaryOptional
nameStringNo
argsObjectYes

Returns: Backbone.Model — Backbone model object.

createWidget #

Factory method for instantiating a widget controller.

Parameters:
NameTypeSummaryOptional
idStringNo
nameStringYes
argsObjectYes

Returns: Object — Alloy widget controller object.

Titanium SDK Documentation