Flex Training Day 4:Flex Events, Metadata & View States
 What are Events? Events propagation in Flex Custom Events Metadata tags View States in Flex
 Events let us know when something happens  within an application Any user or system interaction with your  application ...
   An event system consists of 3 main    entities: dispatchers, listeners, and event    objects. Event dispatchers are ob...
 Almost all event classes extend the  flash.events.Event class EventDispatcher gives the classes a capability  to partic...
When events are triggered, there arethree phases in which Flex checkswhether there are event listeners.These phases occur ...
 During any phase, you can stop the traversal of the  display list by calling one of the following methods  on the Event ...
04/06/12   8
 Metadata tag is the information  to the Flex compiler that  describes how components are  used in a Flex application Th...
04/06/12   10
  What are view states?In many rich Internet   applications, the   interface changes based   on the task the user is   pe...
A.Modified title of Panel container   B.New form item   C.Modified label of Button control   D.New LinkButton control•Item...
Flex Event Propagation, Metadata, View states
Flex Event Propagation, Metadata, View states
Upcoming SlideShare
Loading in …5
×

Flex Event Propagation, Metadata, View states

1,358 views

Published on

Published in: Technology, Education
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,358
On SlideShare
0
From Embeds
0
Number of Embeds
141
Actions
Shares
0
Downloads
11
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Flex Event Propagation, Metadata, View states

  1. 1. Flex Training Day 4:Flex Events, Metadata & View States
  2. 2.  What are Events? Events propagation in Flex Custom Events Metadata tags View States in Flex
  3. 3.  Events let us know when something happens within an application Any user or system interaction with your application can generate events Components generate and dispatch events and consume (listen to) other events.
  4. 4.  An event system consists of 3 main entities: dispatchers, listeners, and event objects. Event dispatchers are objects that dispatch events to objects that are registered as listeners
  5. 5.  Almost all event classes extend the flash.events.Event class EventDispatcher gives the classes a capability to participate fully in the event model. All DisplayList items extend from EventDispatcher For non-visual components we can also implement the IEventDispatcher interface
  6. 6. When events are triggered, there arethree phases in which Flex checkswhether there are event listeners.These phases occur in the followingorder:•Capturing•Targeting•Bubbling‘target’ property refers to thedispatcher of the event.The ’currentTarget’ property refers tothe current node that is beingexamined for event listeners.
  7. 7.  During any phase, you can stop the traversal of the display list by calling one of the following methods on the Event object: stopPropagation() stopImmediatePropagation()Both methods prevents the Eventobject from moving on to the next node,With the difference that stopImmediatePropagation () does not allow any other event listeners on the current node to execute
  8. 8. 04/06/12 8
  9. 9.  Metadata tag is the information to the Flex compiler that describes how components are used in a Flex application The metadata tags define component attributes, data binding properties, events, and other properties of the component. Flex interprets these statements during compilation; they are never interpreted during run time. Metadata statements are associated with a class declaration, an individual data field, or a method. 04/06/12 9
  10. 10. 04/06/12 10
  11. 11.  What are view states?In many rich Internet applications, the interface changes based on the task the user is performing. A simple example is an image that changes when the user rolls the mouse over it. View states let you A.Default view state B.Rich view state easily implement such applications.
  12. 12. A.Modified title of Panel container B.New form item C.Modified label of Button control D.New LinkButton control•Item Creation Policy – deferred or immediate

×