Swiz Mediate

Posted on 2011-10-18
Last Modified: 2012-05-12
hi guys

I have a situation am rendering a textarea (component AutoPopupTextArea) and under the text box i am rendering a datagrid (component CustomGrid )

This is the AutoPopupTextArea code which gets called first
public class AutoPopupTextArea extends FormItem  
public function AutoPopupTextArea()  {
textArea = new TextArea();
Swiz.dispatchEvent(new GlobalScreenEvent(GlobalScreenEvent.EMAIL_LOOKUP));  // 1.this is invoked                        

[Mediate(event="ScreenEvent.DATA_RECEIVED", properties="data")]
public function populateData( data:Object ):void{
if (lookUp) {
lookUp.myCollection = data as ArrayCollection; //but in never comes here      

Next this component is called
public class public class CustomGrid extends VBox  
public function CustomGrid()  {
grid = new AdvancedDataGrid();
Swiz.dispatchEvent(new GlobalScreenEvent(GlobalScreenEvent.EMAIL_LOOKUP));  //this is invoked                        

[Mediate(event="ScreenEvent.DATA_RECEIVED", properties="data")]
public function populateData( data:Object ):void{
if (lookUp) {
lookUp.myCollection = data as ArrayCollection; //This is invoked                  
so what happens is Swiz.dispatchEvent from AutoPopupTextArea is invoked but populateData() in never invoked in AutoPopupTextArea , instead populateData()  is invoked in CustomGrid.

Any idea why populateData() in not invoked in AutoPopupTextArea but populateData()  is invoked in CustomGrid?

Question by:royjayd
    1 Comment
    LVL 29

    Accepted Solution

    did you create a controller

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Highfive + Dolby Voice = No More Audio Complaints!

    Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

    Suggested Solutions

    Title # Comments Views Activity
    Reloading a complete air application 13 434
    Flex automation silktest 3 894
    flex4 : css styles 1 472
    doubt future Flex 4 398
    First things first - Preparation We need all the part for this install and it's much nicer to have them all on hand when you need them so here's what's required. Download Eclipse 3.5 32 bit (I like the Classic flavour) from here. (http://www.e…
    Digital marketing agencies have encountered both the opportunities and difficulties that emerge from working with a wide-ranging organizations.
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
    Sending a Secure fax is easy with eFax Corporate ( First, Just open a new email message.  In the To field, type your recipient's fax number You can even send a secure international fax — just include t…

    758 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now