Repository navigation
Login Widget
grantges edited this page May 7, 2014
·
1 revision
This widget provides ready made interfaces for typical login and user creation flows. All functionality associated with button clicks and/or events is abstracted to leverage user defined callback functions.
##Features
- Pre-defined views for login, user creation and forgotten passwords
- Pre-built animations for transitions on open, and between form types (login, create)
- Abstracted events are dependent on your callback functions - makes it easy to associate with any user management tool
The Appcelerator Login Widget is easy to incorporate into your existing code base.
Using the Alloy.createWidget() function you can add pass in your callback functions that will be triggered by the widget on associated button clicks based on the screen the user is currently on.
#!javascript
/**
* Create an instance of the login widget
*/
var loginWidget = Alloy.createWidget('com.appcelerator.login', null, {
loginCallback: function(e){ //Do something here };
createCallback: function(e){ //Do something here };
remindCallback: function(e){ //Do something here };
});
/**
* Open the widget
*/
loginWidget.open();
OR you can add the widget to your parent controller using the standard XML syntax as well. Callback function attributes are optional.
#!xml
<!-- Declaration within the XML file -->
<Widget id="loginView" src="com.appcelerator.login" loginCallback="myLoginCallback" remindCallback="myReminderCallback" createCallback="myCreateCallback" />
//Usage within the controller
$.loginView.open();
- Compatibility for BlackBerry and Tizen
- Configuration Based Styles
- v1.1 - removed dependency on images, verified support for mobile web, abstracted functionality away from ACS to allow for more generic widget
- v1.0 - initial widget, developed by Betty Tran for FieldService Demo App - (Thanks Betty!)
