| Key points: |
- All server-side code, wrapping the FoodAndDrinks database, was generated by WebORB, as shown in the prerequisite screencast.
- WebORB also generated client-side code, in the FAD_Client package of the client's src package, to provide the client-side interface to the server-side database (FoodAndDrinks).
- grdProducts.dataprovider is bound to ActiveRecords.Product.findAll() (see main.mxml, line 38), and all access to this data, in the UI, is through this dataprovider. See:
- Line 47: data.save() saves the product indicated by 'data' (an element of grdProducts.dataprovider), which may be (or may not be) the currently-selected product.
- Line 13-20: OnSave() saves the currently-selected product (see also Line 84, in which the button that calls OnSave() is defined).
- The bi-directional binding of user interface elements, to keep them in sync; for example:
- Line 60: TextInput txtName's 'text' field is bound to grdProducts.selectedItem.Name.
- Line 25: grdProducts.selectedItem.Name is bound to TextInput txtName's 'text' field.
|