RIA Widget Framework

RIA Widget Framework

The RIA Widget Framework is a Javascript API for creating new user-interface widgets and for wrapping existing third-party widgets from widget providers like Yahoo and ExtJS. Appcelerator comes with a number of pre-built widgets to jumpstart your RIA development efforts. Appcelerator widgets can be added to your application via simple markup - once again, no Javascript is required!

Using Widgets in your Application

Appcelerator widgets are easy to add to your application. First you need to add the appropriate namespace definition to the top of your HTML file:

<html xmlns="http://www.w3.org/1999/xhtml" xmlns:app="http://www.appcelerator.org">

All Appcelerator widgets are in the app namespace.

Now, you’re ready to add a widget. Here’s an example of the calendar widget. This particular widget is a YUI widget that was wrapped to be an Appcelerator widget

Here’s the code:

<app:calendar title="Pick a Date" on="l:show.calendar then execute" inputId="mydate" close="true">
</app:calendar>
<input type="text" id="mydate" value="click me" on="focus then l:show.calendar"/>
<button on="click then l:show.calendar">Set Date</button>

Creating a new Widget

Creating Appcelerator widgets does require that you know Javascript, but it’s easy to learn. For more information on creating new widgets or integrating existing third-party widgets see our Reference Guide.

Pre-built Widgets

The Widget Reference section contains documentation for pre-built widgets.