MACROMEDIA FLEX-GETTING STARTED WITH FLEX Getting Started page 78

Table of Contents

Advertisement

The component contains the following property definitions in an
var shoppingCart
var dataObject
The
shoppingCart
The component contains MXML tags for displaying product details. It also contains an
<mx:NumericStepper>
items to the ShoppingCart.
The following example from the FlexStore.mxml file shows how the
set to the
ShoppingCart object. Notice that you reference the custom ShoppingCart and
cart
ProductDetail objects using the default namespace.
...
<ShoppingCart id="cart"/>
...
<ProductDetail id="productDetail" dataObject="{selectedItem}"
shoppingCart="{cart}" width="370" height="330" vScrollPolicy="off"/>
...
Checkout
The Checkout object is defined in an MXML component because it is a visual object that you can
create using MXML tags and a small amount of ActionScript code. The top-level tag of the
Checkout component is a VBox container.
The component uses an
The Checkout_script.as file contains the following property definitions:
var cartData
var months
var years
var shippingCost
The
property stores ShoppingCart data.
cartData
The component uses the
The Checkout_script.as file contains the following method definition:
confirmOrder()
The Checkout component contains an
<mx:Model id="order">
and data validator tags.
The following example from the FlexStore.mxml file shows how the
set to the
ShoppingCart object. Notice that you reference the custom ShoppingCart and
cart
Checkout objects using the default namespace.
...
<ShoppingCart id="cart"/>
...
<Checkout id="checkoutView" cartData="{cart}"/>
78
Chapter 4: Architecting Flex Applications
property stores ShoppingCart data.
tag for selecting product quantity, and an
tag to include the ActionScript file Checkout_script.as.
<mx:Script>
,
, and
months
years
<mx:Form>
tag for storing order information. It also contains data formatter tags
<mx:Script>
<mx:Button>
properties to store credit card data.
shippingCost
tag for entering order information, and an
tag:
tag for adding
property is
shoppingCart
property is
shoppingCart

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLEX-GETTING STARTED WITH FLEX and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Flex

Table of Contents