Unanswered: Drag and Drop Your Mobile App Script

Hi all,

A few of you requested the script that Phil and I used in our session.

Start new Touch 2.2 Project
= Views =
Add a top level navigation view and set these configs
- userClassName: MainNav
- userAlias: mainnav
Add a navigation bar (we did it via the config pane)
Add a button to that navigation bar and set these configs
- align: right
- itemId: logoutBtn
- text: Log out
Add a list to the navigation view and set these configs
- title: Orders
- itemId: orderList
- itemCls: order-list-element
Install the attached OrderDetailsPanel.xdc (Edit->Import Component), add it as a top level component, and make sure the userClassName is set to 'OrderDetailsPanel' and the userAlias is orderdetailspanel
Install the attached LoginPanel.aux.zip extension (change the filename to LoginPanel.aux, the forums don't allow .aux files yet), add it as a top level component, and set these configs
- userClassName: LoginPanel
- userAlias: loginpanel
Unset the initial view from the navigation view
= Data =
Create a top level model and set these configs
- userClassName: OrderModel
- fields: id, orderNo, customerId, orderData, shipDate, total, tax, paid, shipping
Create a top level JsonP store and set these configs
- userClassName: OrdersStore
- storeId: OrdersStore
- model: OrderModel
Set these configs on the proxy
- extraParams: { unfulfilled: true }
- url: http://senchapingpongstore.com/orders

This service doesn't actually required authentication (so you can easily test/view orders list). If you wish to test mock data, enter this array in the data config and check the 'mock data' box:

Add another controller and set the userClassName to OrderController
Add a controller action to that controller and set these configs
- controlQuery: mainnav #orderList
- targetType: Ext.dataview.List
- name: itemtap
Add this code:

For osx users that want to deploy to the iOS simulator:
Download the latest version of Cmd (http://www.sencha.com/products/sencha-cmd/download)
Select the package button and select the first tab (Install plug-ins)
Enter in the location of Cmd
Select the second tab (Setup project with cmd) and point to where Touch 2.2 is located on your harddrive
Select the 'Setup project with cmd' button - it should pop up a console window and setup the project
Select the third tab (Package settings) and create a package settings

Open the app.json file in your project root and add this object to the css array: