Werid problem about 'implements' in mxml file.

Hi, all:
There are more than 50 modules in my project, We build it with flexmojos 4.0-alpha-5. Most of the time, I goes well, but built failed occasionally, error message as fllows:
Error: Cannot resolve attribute 'implements' for component type spark.components.Group.
All errors come from mxml file that implements some interface, for example:
<Group xmlns:fx="http://ns.adobe.com/mxml/2009"
               xmlns:s="library://ns.adobe.com/flex/spark"
               xmlns:mx="library://ns.adobe.com/flex/mx"
              implements="some.interfaces.name">
</Group>
some elements in my pom.xml:
<configurationReport>false
<useNetwork>true
<verifyDigests>true
<linkReportAttch>false
<sizeReportAttch>false
<AllowSourcePathOverlap>true
<staticLinkRuntimeShareLibraries>false
<quick>false
<optimize>true
Flex compiler version:4.5.1.21328
Anybody got some error like that? or give me some advice for it, thanks for advance.

Thanks, Craberoid.
We tried 4.2, but error occoured as before.
More than 50 modules use 20g+ memory to build, that is flexmojos's another problem, so we changed maven to Ant... it work well.

Similar Messages

  • Problem about Handling of Empty Files in File Adapter

    Hello everyone,
    NetWeaver 2004s --- XI
    In Sender i have a File Adapter.
    Now i meet a problem about Handling of Empty Files. When i send empty file, but don't cerate a leer message.
    I have seen following text in help document. But in adapter configuration i can not find the correspond parameter.
    can you give me some tips?
    Thx in advance
    best regards
    Yaning
    SAP Help Document über File Adapter
    +Handling of Empty Files
    Specify how empty files (length 0 bytes) are to be handled.
    &#9675;       Do Not Create Message
    No XI messages are created from empty files.
    The files are processed according to the selected Processing Mode.
    For example, if the processing mode is Delete, empty files are deleted in the source directory.
    &#9675;       Process Empty Files
    XI messages are created with an empty main payload.
    The files are processed according to the selected Processing Mode.
    &#9675;       Skip Empty Files
    No XI messages are created from empty files.
    Empty files are skipped and remain in the source directory.+
    Help Docu

    hi,
    it's available since Sp19 for XI 3.0
    and the corresponding SPS fpr XI 7.0
    http://help.sap.com/saphelp_nw04/helpdata/en/44/f565854b7341e6e10000000a1553f6/frameset.htm
    so probably you need to install the new SP
    Regards,
    michal
    <a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>

  • A Problem about zip a Chinese File with Java Zip package

    Hi,
    my problem is following:
    I use "Java(1.3.1_02) Zip package" to compress some files into a zip File
    all thing is smooth except one:(
    If there is a fileName with Chinese (big5 encoding) characters
    it doesen't work!
    Can anyone tell me how to do?
    Thanks a lot!

    Hi !
    i do have a problem relating with the different character(korean).Hope u must be working with chinese characters.My problem is while displaying the korean characters from database , the characters are broken and not able to display on jsp pages.....
    Hope u can understand my problem.....
    Thanks....

  • Problem about implementation of a controller in main_vi based on the test data of sub_vi

    Hi Group:
     I am developing a measurement and control system based on the PCI-6040E and SCXI1001,1102, and 1160.
    But now, I have a question ,which is how to implement a controller in main_vi based on the test data of sub_vi.
    my  program is consist of main_vi and  several sub_vi,  the main_vi is used for controlling and give the operation signal to hardware system (relay). and sub_vi is used for sampling data.
    for example: the sub_vi collects data from the hardware and the control algorithm and output is implemented in the main_vi, so the question is how to transfer the test data from the sub_vi to main_vi synchronously.
    I try to set the output connecter, but the data just return when  sub_vi is closed.
    anybody have good idea about it.
    Thanks a lot

    Hi hanwei,
    I'm making the assumption that you are not using LabVIEW Real-Time. If you are, you should use RT FIFOs. Otherwise, follow MikeS81's advice.
    I would go a step further and say that most likely it would be a better design to remove the loop (while loop?) from the subVI and instead place the subVI within a while loop in your top-level VI. This way on each execution of your subVI it will quickly return your data. Then you can also perform all the queue and dequeue operations in the two seperate while loops in your top-level VI. This organization will be easier to read, document, and understand.
    Mike Lyons
    National Instruments
    http://www.ni.com/devzone

  • A problem about implementing Background CO in 7.1.1

    Hi,all.
       I tried to implement backgrond CO in 7.1.1.
       I implemented my background co in several ways.
       No matter which way i did it, I always got an error message
      "java.lang.NoClassDefFoundError:com/sap/caf/eu/gp/co/api/IGPBackgroundCallableObject ".
       I tried to following the tutorial and the note, but it`s still the same.
       Can anyone give me a hand? Thanks.
    BR.
    Louis Huang

    Hi, all.
    My problem looks like that my background co can`t find com/sap/caf/eu/gp/co/api/IGPBackgroundCallableObject.
    I have checked this class which exists in  caf/eu/gp/api and I have added it to my ear project with every kind of dependency including build time, design time, deploy time, and runtime.
    Did I miss anything?
    I really have no idea what I can do now.

  • Problem about the GeoRaster demo files

    Hi there!
    The document "Oracle Spatial GeoRaster 10g Release 1 (10.1)" says I could find the demo files under the installation directory "$ORACLE_HOME/md/demos/georaster/plsql",but I cannot find the "demos" folder under the "md" directory.If you installed 10g and got the "plsql" folder,could you send it to me please?
    Thank you very much!
    My e-mail is: [email protected]

    hi Dan:
    Thanks for your reply,but I have not get the companion cd.could you please send the files to my e-mailbox?
    I only need the demo files in "md/demos/georaster/plsql".Thank you!

  • Implement forms in different .mxml files

    Hi!
    I'm starting developing an application with Flex wich will
    have differente views. I wonder if it is possible to implement each
    view in a different .mxml file and how to do it. I now it is
    possible to define states but what I want is to define different
    forms (that probably would have states).
    Any help will be appreciated.
    Thank you.

    Yes, you can create separate .mxml files for just about
    anything. So you could create a new .mxml for each "form" view
    where <mx:Form> is the root of each file.
    States apply only to the file they are defined in, so you can
    have a form with different states based on form item selection. I
    can then nest components with states within on another.
    Also, as Greg points out, "States" are not used for
    navigation, that is what the navigator containers are for. (i.e.
    ViewStack, TabNavigator, etc...) States are for modifying a
    component slightly based on an event.
    Using your example, if a user selects a specific option in a
    ComboBox, you add another TextInput to the form. In a more generic
    example, you display a catalog of products. When the user mouses
    over a product, the image is highlighted and an add to cart button
    appears.
    HTH

  • A problem while implementing a file to file senario

    hi all :
         There is some problem while implement a file to file senario. the file couldn't be sent or recieved.
          and as I try to check Check the Sender File Adapter Status  via
         Runtime Workbench -> Component Monitoring -> Communication Channel Monitoring ,
         It is found that Adapter Engine has error status with red light.  Is it why the file couldn't be sent?
        Could you please tell me how to make Adapter Engine  available?
        Thank you very much!!!

    Hi Sony
    Error getting JPR configuration from SLD. Exception: No entity of class SAP_BusinessSystem for EC1.SystemHome.cnbjw3501 found
    No access to get JPR configuration
    Along with what experts suggested
    What is the type of Business system is this. Standalone Java?
    JPR can have problem if you have a business system thats not ABAP/Java type if this system is not having a SAP TS in landscape then create Java type.
    Thanks
    Gaurav

  • Report RFIDITVCL - problem about file size

    Hi All,
    I have implemented the sap note 0001606246 and 0001639418 and I'm making some test
    Please, could you tell me how can you solve the problem of the maximum number of row? it is required that detail records can not exceed 15.000. I made a small test and my file contained more than 36000 rows. The same problem is related to the file size that can not exceed 3 MB. Have you the same problem or how did you solve it?
    Thank you very much for your help.
    Regards,
    Claudia

    HI
    please follow the below notes.
    1666923 1666127
    1663480   issue no 5 Issue  5: File output should not exceed the limit of 3MB.
    1660092 1639418 1606246
    all issuess are addressed by above notes.
    Regards
    Madhu M

  • Problem about space management of archived log files

    Dear friends,
    I have a problem about space management of archived log files.
    my database is Oracle 10g release 1 running in archivelog mode. I use OEM(web based) to config all the backup and recovery settings.
    I config "Flash Recovery Area" to do backup and recovery automatically. my daily backup schedule is every night at 2:00am. and my backup setting is "disk settings"--"compressed backup set". the following is the RMAN script:
    Daily Script:
    run {
    allocate channel oem_disk_backup device type disk;
    recover copy of database with tag 'ORA$OEM_LEVEL_0';
    backup incremental level 1 cumulative copies=1 for recover of copy with tag 'ORA$OEM_LEVEL_0' database;
    the retention policy is the second choice, that is "Retain backups that are necessary for a recovery to any time within the specified number of days (point-in-time recovery)". the recovery window is 1 day.
    I assign enough space for flash recovery area. my database size is about 2G. I assign 20G as flash recovery area.
    now here is the problem, through oracle online manual, it said oracle can manage the flash recovery area automatically, that is, when the space is full, it can delete the obsolete archived log files. but in fact, it never works! whenever the space is full, the database will hang up! besides, the status of archived log files is very strange, for example, it can change "obsolete" stauts from "yes" to "no", and then from "no" to "yes". I really have no idea about this! even though I know oracle usually keep archived files for some longer days than retention policy, but I really don't know why the obsolete status can change automatically. although I can write a schedule job to delete obsolete archived files every day, but I just want to know the reason. my goal is to backup all the files on disk and let oracle automatically manage them.
    also, there is another problem about archive mode. I have two oracle 10g databases(release one), the size of db1 is more than 20G, the size of db2 is about 2G. both of them have the same backup and recovery policy, except I assign more flash recovery area for db1. both of them are on archive mode. both of nearly nobody access except for the schedule backup job and sometime I will admin through oem. the strange thing is that the number of archived log files of smaller database, db2, are much bigger than ones of bigger database. also the same situation for the size of the flashback logs for point-in-time recovery. (I enable flashback logging for fast database point-in-time recovery, the flashback retention time is 24 hours.) I found the memory utility of smaller database is higher than bigger database. nearly all the time the smaller database's memory utility keeps more than 99%. while the bigger one's memory utility keeps about 97%. (I enable "Automatic Shared Memory Management" on both databases.) but both database's cup and queue are very low. I'm nearly sure no one hack the databases. so I really have no idea why the same backup and recovery policy will result so different result, especially the smaller one produces more redo logs than bigger one. does there anyone happen to know the reason or how should I do to check the reason?
    by the way, I found web based OEM can't reflect the correct database status when the database shutdown abnormally. for example, if the database hang up because of out of flash recovery area, after I assign more flash recovery area space and then restart the database, the OEM usually can't reflect the correct database status. I must restart OEM manually to correctly reflect the current database status. does there anyone know in what situation I should restart OEM to reflect the correct database status?
    sorry for the long message, I just want to describe in details to easy diagnosis.
    any hint will be greatly appreciated!
    Sammy

    thank you very much, in fact, my site's oracle never works about managing archive files automatically although I have tried all my best. at last, I made a job running daily to check the archive files and delete them.
    thanks again.

  • Problem in drawing line in script tag of mxml file

    hai i am new in flex .i was trying to draw line in mxml(using mxml ) and did it.
    then i try this in actionscript by making as file and shape class object again did it
    but
    when i put that specific function in <fx:script> tag of mxml file and call it by mouseover method it is not drawing a line.i am sure that on mouse over function was called .but dont know why line is nort draw here.
    Here is my code:
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                   xmlns:s="library://ns.adobe.com/flex/spark"
        xmlns:mx="library://ns.adobe.com/flex/mx">
        <fx:Script>
            <![CDATA[
            import flash.display.Shape;
            var s:Shape = new Shape();
            public function myMain():void
                // Launch your application by right clicking within this class and select: Deubg As > FDT SWF Application
            so.text="button is cliked";
            s.graphics.lineStyle(3, 0x00FF00,.5);       
            s.graphics.lineTo(200, 200);
            this.addChild(s);
            so.text="button is cliked";
            ]]>
        </fx:Script>
        <mx:Label alpha=".3" id="so" mouseOver="myMain()" text="Button"/>
    </s:Application>
    Can anyone tell me where i am going wrong.

    It's a good idea to run you code in the debugger because you will be notified of runtime exceptions that the release version of the Flash Player will not show you. Here's the runtime error I got when running your example:
    Error: addChild() is not available in this class. Instead, use addElement() or modify the skin, if you have one.
         atspark.components.supportClasses::SkinnableComponent/addChild()[frameworks\projects\ spark\src\spark\components\supportClasses\SkinnableComponent.as:1118]
         at myMain()[b.mxml:19]
         at __so_mouseOver()[b.mxml:27]
    The problem with your app is it is calling addChild(), which is not supported on s:Application. You need to call addElement() instead. addElement() only takes an object of type IVisualElement so you need to make your shape a UIComponent.  Try this:
                import mx.core.UIComponent;
                private var s:UIComponent = new UIComponent();
                public function myMain():void
                    // Launch your application by right clicking within this class and select: Deubg As > FDT SWF Application
                    so.text="button is cliked";
                    s.graphics.lineStyle(3, 0x00FF00,.5);
                    s.graphics.lineTo(200, 200);
                    this.addElement(s);
                    so.text="button is cliked";
    -Darrell

  • Pls Help!! A implementation Problem about GUI

    Dear All
    I had a question about Implementation of belowing senario
    First I have a Frame called Frame1
    Frame1 had 2 buttons(back, cancel) and some TextFields
    I input something into Frame1's fields
    then if i click next, it will go to Frame2
    how to implement this? i mean once i clcik next
    Frame1 should be disappear and Frame2 should
    be generated.
    In Frame2 has some Textfields and 3 buttons
    (back, cancel, next)
    if i click back, it should back to frame1, itself(frame2)
    should disappear, and when back frame1,
    should also show frame1's previous inputs(before u enter
    frame2, you input some setting in textfields)
    Thx in advance

    take a look at focus, hide, visible properties and related methodes.

  • Problem on downloading a zip file

    I am having a problem on downloading a zip file(file size is about 2Mb). Sometimes I can get a complete file and can open the file, sometimes the zip file is chunked(the file size is smaller than the right one), so I can't open it.
    The file content is stored in a blob field. The code first goes to database get the blob as inputstream, then copy the inputstream into response.getOutputStream().
    The problem is unpredictable. Even for the same blob data, sometimes I can get working file, sometimes I just get crapped file.
    Could somebody help me out? I am struggling with it.
    Any input is appreciated!
    public class DownloadTextAction extends Action implements Serializable{
        private static Log log = LogFactory.getLog(DownloadTextAction.class);
        public ActionForward execute(ActionMapping mapping, ActionForm form,
                                     HttpServletRequest request,
                                     HttpServletResponse response) throws Exception
            ActionErrors errors = new ActionErrors();
            String batch_id = (String)request.getParameter("batch_id");
            String fileName = batch_id+".zip";
            try
    //          response.setContentType("application/octet-stream");
              response.setContentType("application/download");
      //        response.setContentLength(content.length());
    //          response.setHeader("Content-Disposition", "inline; filename=\""
    //                    + fileName + "\"");
              response.setHeader("Content-Disposition", "attachment; filename=\""
                        + fileName + "\"");
              InputStream in = untilService.getBlob(batch_id);         
              OutputStream out = response.getOutputStream();
              FileHelper.copy(in, out);
              out.flush();
              in.close();
              out.close();
            catch (Exception e)
              errors.add(ActionErrors.GLOBAL_ERROR, new ActionError("error.detail", e.toString()));
              saveErrors(request, errors);
              log.error(e.toString());      
            return mapping.findForward(Constants.SUCCESS);
        }

    Maybe a fault in the missing FileHelper.copy() method?

  • [svn] 3275: Initial check in for support for asdoc comments in mxml files.

    Revision: 3275
    Author: [email protected]
    Date: 2008-09-19 15:01:57 -0700 (Fri, 19 Sep 2008)
    Log Message:
    Initial check in for support for asdoc comments in mxml files.
    For adding comments at the class level or to properties defined inside mxml use the syntax
    Other tags supported in asdoc should also work. for example @see, @includeExamples etc.
    QA: Yes
    Doc:
    Reviewed By: Paul
    Tests: checkintests
    Modified Paths:
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/asdoc/AsDocAPI.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/asdoc/TopLevelClassesGenerator.ja va
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/ImplementationCompiler.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/ImplementationGenerator.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/InterfaceCompiler.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/MxmlCompiler.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/builder/AbstractBuilder.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/builder/DocumentBuilder.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/dom/MxmlScanner.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/dom/Node.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/gen/ClassDef.vm
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/rep/Model.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/rep/MxmlDocument.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/rep/decl/PropertyDeclaration .java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/rep/decl/UninitializedProper tyDeclaration.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/rep/init/ValueInitializer.ja va
    flex/sdk/trunk/modules/compiler/src/java/flex2/tools/ASDocConfiguration.java
    Added Paths:
    flex/sdk/trunk/asdoc/templates/images/AirIcon12x12.gif
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/util/MxmlCommentUtil.java

    @John - no luck on the plugin angle. In checking both JDev installs that previously had the problems, they have the default extensions.
    @Dave - at the time I can't say we noticed any migration notices, we certainly didn't see the migration dialog though. However the application in SVN was built on the same version of JDev so I don't expect a migration to find any changes anyhow.
    However on your second point we always check out into an empty directory, as we're checking out the whole application. As such if as you say the migration utilities is always called, shouldn't that mean we always see the projects modified? We certainly don't, we're on a day by day basis checking out whole applications to different directories and we don't see that behaviour.
    In turn reconsidering the modified .jpr file, from what I saw it looks to me that the whole project file is re-set to it's original state. Initially the problem detected was the libraries attached to the project were gone so we couldn't compile, but in close inspection it seems the whole .jpr file has been modified to a rather vanilla setup.
    One thing I can say when we originally experienced the problem (and from memory this was true in the dim dark past when it also occurred another time), is it was a check out from a SVN tags directory, not the trunk. In thinking about it, it may be the first check out from the tags directory that we see the issue. However to get around the issue we just revert the project file in the tags directory, we don't actually change the SVN repository code (ie. commit), so the issue should keep occurring. Yet at the moment if we check out the same tags directory, the issue doesn't occur?
    Hmmm?
    Btw Dave, are you an Oracle employee?
    CM.

  • Passing parameters between mxml files(used in viewstack).

    Hi All,
       In login page, I'm calling RemoteObject method for validating user credentials. In login success, I'd like to keep user name in a variable and call menu page where it is having menu for the application. In menu.xml file, I'm putting home tab is a default selection.
        Depending upon login username it should fetch data for displaying DataGrid in home page. Please find my code
       //Login Page Begin(login.mxml)
      <mx:Script >
            <![CDATA[
       private function login_resultHandler(event:ResultEvent):void
                    userdetails = event.result as ArrayCollection
                    Alert.show("userdetails 0:",userdetails.getItemAt(0).toString());
                    Alert.show("userdetails 1:",userdetails.getItemAt(1).toString());
                    if(userdetails!=null && userdetails.length>=1)
                        login_ViewStack.selectedIndex=1;
                    else
                        loginmessage.visible=true;
    ]]>
        </mx:Script>
       <mx:ViewStack x="0" y="0" id="login_ViewStack" width="100%" height="100%" creationPolicy="all" borderStyle="solid">
            <mx:Canvas label="loginpage" width="100%" height="100%">
                <mx:Form x="213" y="137" height="153" width="348">
                    <mx:FormItem width="262" required="false" height="25" label="Username: " fontSize="14" fontWeight="bold">
                        <mx:TextInput id="username_text"/>
                    </mx:FormItem>
                    <mx:FormItem label="Password: " fontSize="14" fontWeight="bold" width="262">
                        <mx:TextInput id="password_text" displayAsPassword="true" enter="ro_login.checkLogin(username_text.text,password_text.text);"/>
                    </mx:FormItem>
                    <mx:FormItem width="265">
                    </mx:FormItem>
                    <mx:FormItem width="251" label="" horizontalAlign="center">
                        <mx:Button label="login" click="ro_login.checkLogin(username_text.text,password_text.text);"/>
                    </mx:FormItem>
                </mx:Form>
                <mx:FormHeading x="213" y="109" label="Login Page" width="124" fontWeight="bold" fontSize="16"/>
                <mx:Text x="213" y="83" text="Invalid Username and password" id="loginmessage" color="#F43D13" fontSize="16" fontWeight="bold" visible="false"/>
            </mx:Canvas>
            <local:menu id="menu_setup" label="" xmlns:local="*"/>
            </mx:ViewStack>
       //Login Page End
       In checkLogin method, it is validating username/password. and I'm selecting view stack '1' for displaying menu.
      //Menu Page Begin(menu.mxml)
      <mx:Script >
             <![CDATA[
    public function init(): void{        
                myViewStack.visible=true;
                selectedmenu="HOME";
    ]]>
         </mx:Script>
      <mx:Panel  width="100%" height="100%" layout="absolute">
            <mx:ToggleButtonBar id="mainmenu" width="60%" height="39" itemClick="fillsubmenu(event);" dataProvider="myViewStack" buttonMode="true" autoLayout="true" styleName="mystyle" x="118"/>
            <mx:ViewStack id="myViewStack" borderStyle="solid" width="100%" height="465" creationPolicy="all" visible="true"  y="67" x="10">
                <local:home id="page1" label="HOME" xmlns:local="*"/>
                <local:newcontact id="page2" label="NEW CONTACT" xmlns:local="*"/>
                <local:search id="page3" label="SEARCH" xmlns:local="*"/>
                <local:help id="page4" label="HELP" xmlns:local="*"/>
            </mx:ViewStack>
        </mx:Panel>
    </mx:Canvas>
      //Menu Page End
      //HOME Page Begin(menu.mxml)
      <mx:RemoteObject id="ro_records" destination="inquiryService" result="getInquries_resultHandler(event)"
                         endpoint="http://localhost:7001/flexbb/spring/messagebroker/amf">
            <mx:method name="getInquires" result="getInquries_resultHandler(event)"/>
        </mx:RemoteObject>
        <mx:DataGrid id="dg" width="100%" height="100%">
                <mx:columns>
                    <mx:DataGridColumn dataField="inquiry_id" headerText="Report Id"/>
                    <mx:DataGridColumn dataField="inquiry_type" headerText="Report Type"/>
                    <mx:DataGridColumn dataField="full_name" headerText=" Consumer Name"/>
                </mx:columns>
          </mx:DataGrid>
      //HOME Page End
       I'm having following questions:
       How to keep username in session scope. Need to be accessed in all pages.
       How to pass username from login page to home page.
       In HOME page, if I mention 'creationComplete="ro_records.getinquires()"' it will be invoked when I call login.mxml file, so how to invoke getinquires() method passing username when login is successful.
       Thanks in advance.
    Regards,
    Sharath.

    If this post answered your question or helped, please mark it as such.
    To keep username in session scope, so it can be accessed in all pages, and to pass the user name from login to home page, you use custom events, as in my example application. The Flex project archive is attached, but here is the code:
    -------------- assets\css\appHeader.css -----------------
    /* CSS file */
    .welcomeLabel{
      fontSize: 20;
      color: #FFFFFF;
      left: 50;
      verticalCenter: 0;
    .titleLabel{
      horizontalCenter: 0;
      verticalCenter: 0;
      fontSize: 24;
    .loginButton{
      right: 30;
      verticalCenter: 0; 
    ---------------- com\westernstates\classes\controller\WesternStatesController.as -------------------
    package com.westernstates.classes.controller
      import com.westernstates.classes.events.*;
      import com.westernstates.classes.model.*;
      import flash.display.DisplayObject;
      import flash.events.Event;
      import mx.core.UIComponent;
      import mx.events.FlexEvent;
      import mx.managers.PopUpManager;
      // This class forms the "controller" of the MVC (Model-View-Controller)
      // architecture used in this application. Rather than have code in the
      // application and in components, the MVC architecture relies on events
      // handled in the controller.
      // Extend UIComponent so this class has a reference to systemManager,
      // so all events that bubble can be handled.
      public class WesternStatesController extends UIComponent{
        // The constructor uses this classes creationComplete event
        // to call the setupEventListeners method to register events
        // with the controller that allow it to "control" much of the
        // application, and also to popup the Login form.
        public function WesternStatesController(){
          addEventListener( FlexEvent.CREATION_COMPLETE, init);
        // Add event listeners to the system manager so it can handle events
        // of interest bubbling up from anywhere in the application.
        private function init( event:Event ):void{
          systemManager.addEventListener(LoginEvent.LOGIN, login, true);
          systemManager.addEventListener(LoginSuccessEvent.LOGIN_SUCCESS, handleLogin, true);
          systemManager.addEventListener(LoginFailureEvent.LOGIN_FAILURE, handleLogin, true);
          login(new LoginEvent(LoginEvent.LOGIN));
        private function login(evt:LoginEvent):void{
          PopUpManager.addPopUp(WesternStatesModel.appLogin, WesternStatesModel.app as DisplayObject, true); 
        private function handleLogin(evt:LoginEvent):void{
          if(evt.type == LoginSuccessEvent.LOGIN_SUCCESS){
            WesternStatesModel.userInfo.userName = LoginSuccessEvent(evt).userName;
            WesternStatesModel.appHeader.currentState = "loginSuccess";
          }else if(evt.type == LoginFailureEvent.LOGIN_FAILURE){
            WesternStatesModel.appHeader.currentState = "loginFailure";
            WesternStatesModel.appLogin.reset();
    ----------------------- com\westernstates\classes\events\LoginEvent.as -----------------
    package com.westernstates.classes.events
      import flash.events.Event;
      /* This custom event is the base class from which other login related
       * events are derived. This makes it possible to dispatch a login related
       * event and set the loginEventType property, and then in the event handler,
       * check this property and execute based on the login event type.
       * In reality, extending this class doesn't really provide much additional
       * value, but from a conceptual standpoint it might make sense, and as we
       * develop the application further, we might develop this class further.
      public class LoginEvent extends Event{
        public static const LOGIN:String = "login";  
        public function LoginEvent(type:String){
          super(type, true);
    ------------------ com\westernstates\classes\events\LoginFailureEvent.as ------------------
    package com.westernstates.classes.events
      import flash.events.Event;
      // This custom event should be dispatched if the user fails to
      // successfully log into the application.
      public class LoginFailureEvent extends LoginEvent{
        public static const LOGIN_FAILURE:String = "loginFailure";  
        public function LoginFailureEvent(){
          super(LoginFailureEvent.LOGIN_FAILURE);
    ---------------------- com\westernstates\classes\events\LoginSuccessEvent.as -----------------
    package com.westernstates.classes.events
      import flash.events.Event;
      // This custom event should be dispatched if the user
      // successfully logs into the application.
      public class LoginSuccessEvent extends LoginEvent{   
        public static const LOGIN_SUCCESS:String = "loginSuccess"; 
        private var _userName:String;
        public function LoginSuccessEvent(userName:String){
          // Store the username for the user that successfully logged in.
          // The application can access the username from the event object.
          this._userName = userName;
          super(LoginSuccessEvent.LOGIN_SUCCESS);
        // A getter is necessary for the application to be able to access the private
        // variable containing the username for the user that successfully logged in.
        // A setter is unnecessary because the username is determined upon login
        // and there is no reason to change it.
        public function get userName():String{
          return this._userName;
    --------------------- com\westernstates\classes\misc\User.as -----------------
    /* This class is used to store information about the user currently logged in.
       The user's password should not be stored here. Currently only the username
       is stored in this class, but later we will add more data.
    package com.westernstates.classes.misc
      [Bindable]
      public class User
        // The public accessor methods (a getter and a setter) allow us to access this private variable.
        private var _userName:String;
        public function User(){
        public function get userName():String{
          return this._userName;
        public function set userName(user:String):void{
          this._userName = user;
    ------------------ src\com\westernstates\classes\model\WesternStatesModel.as ---------------
    package com.westernstates.classes.model
      import com.westernstates.classes.misc.*;
      import components.*;
      import mx.core.Application;
      // This class forms the "model" of the MVC (Model-View-Controller)
      // architecture used in this application. Data that would otherwise
      // be found in the application or component files are centralized here.
      public class WesternStatesModel{
        // This variable allows us to enforce having only one model object,
        // and provides an entry point to access the data in the model.
        private static var instance:WesternStatesModel;
        // This variable is a convenience obj allowing us to access the
        // main app children when necessary. It would be better to replace
        // this with an event, making even greater use of the MVC architecture.
        public static var app:Object = mx.core.Application.application;
        // This object is used to store information about the user currently logged in.
        [Bindable] public static var userInfo:User = new User();
        // References to UI components.
        public static var appHeader:ApplicationHeader = app.appHeader;
        public static var appLogin:Login = new Login();
        // Ensure only one instance of the model exists at any time (singleton).
        public function WesternStatesModel(){
          if( instance != null ){
            throw( new Error( "There can only be one instance of WesternStatesModel." ) );
        // This method is used throughout to access non-static variables of the model.
        public static function getInstance():WesternStatesModel{
          if( instance == null ){
            instance = new WesternStatesModel();
          return instance;
    -------------------- src\components\ApplicationHeader.mxml ----------------
    <?xml version="1.0" encoding="utf-8"?>
    <mx:ApplicationControlBar xmlns:mx="http://www.adobe.com/2006/mxml"
      width="100%" dock="true">
      <mx:Script>
        <![CDATA[
          import com.westernstates.classes.events.*;
          import com.westernstates.classes.model.WesternStatesModel;
          private function logInOut(evt:MouseEvent):void{
            if(evt.currentTarget.label == "Login"){
              this.dispatchEvent(new LoginEvent(LoginEvent.LOGIN));
            }else{
              this.currentState = "";
        ]]>
      </mx:Script>
      <!--
        This component is the docked control bar at the top of the application,
        where we display a welcome message upon successful login, or a login
        error message for login failure. We also have the main application
        title label, and utility buttons such as Logout/Login.
      -->
      <!--
        The external css file supports our architecture of separating the
        definition of the UI from style rendering.
      -->
      <mx:Style source="../assets/css/appHeader.css"/>
      <!--
        States allow us to control changes in the labels and buttons.
        State changes are managed by the controller class.
      -->
      <mx:states>
        <mx:State name="loginSuccess">
          <!--
            The binding braces { } are necessary to resolve the entire welcome
            string using hard coded pieces and the username in the model.
          -->
          <mx:SetProperty target="{welcomeLbl}" name="text"
            value="{'Welcome ' + WesternStatesModel.userInfo.userName + ' !!!'}"/>
          <mx:SetProperty target="{welcomeLbl}" name="visible" value="true"/>
          <mx:SetProperty target="{loginBtn}" name="label" value="Logout"/>
        </mx:State>
        <mx:State name="loginFailure">
          <mx:SetProperty target="{welcomeLbl}" name="text" value="LOGIN FAILED !!!"/>
          <mx:SetProperty target="{welcomeLbl}" name="visible" value="true"/>
        </mx:State>
      </mx:states>
      <!--
        Usually we would try to use auto-layout containers, such as VBox, HBox, etc.
        but the application header is a simple component and we want to anchor labels
        and buttons to the left and right sides of the component, or center them,
        and a Canvas and constraint based layout makes this easier. The constraint
        based layout settings are in the css file.
      -->
      <mx:Canvas width="100%" height="100%">
        <mx:Label id="welcomeLbl" text="Welcome !!!" visible="false" styleName="welcomeLabel"/>
        <mx:Label id="titleLbl" styleName="titleLabel" text="Western Gallery of Photography"/>
        <mx:Button id="loginBtn" label="Login" click="logInOut(event);" styleName="loginButton"/>
      </mx:Canvas>
    </mx:ApplicationControlBar>
    ------------------- src\components\Login.mxml -------------------
    <?xml version="1.0" ?>
    <mx:Panel xmlns:mx="http://www.adobe.com/2006/mxml"
      title="Login" horizontalScrollPolicy="off"
      verticalScrollPolicy="off" creationComplete="init();"
      defaultButton="{loginBtn}">
      <mx:Script>
        <![CDATA[
          import mx.controls.Alert;
          import com.westernstates.classes.events.*;
          import mx.collections.ArrayCollection;
          import mx.managers.PopUpManager;
          // This test username and password would not be here in a real application.
          private var testUser:String = "user1";
          private var testPwd:String = "testme";
          private function init():void{
            this.reset();
            PopUpManager.centerPopUp(this);
          public function reset():void{
            userTxt.text = "";
            passwordTxt.text = "";
          private function login(evt:Event):void{
            if(userTxt.text == testUser && passwordTxt.text == testPwd){
              this.dispatchEvent(new LoginSuccessEvent(userTxt.text));
              this.reset();
              PopUpManager.removePopUp(this);
            }else{
              this.dispatchEvent(new LoginFailureEvent());
              mx.controls.Alert.show("Login Failed!!!");
        ]]>
      </mx:Script>
      <!--
        Currently this login form is very basic. Later we will add validation,
        states, effects, etc.
      -->
        <mx:Form id="loginForm">
          <mx:FormItem label="Username:">
            <mx:TextInput id="userTxt"/>
          </mx:FormItem>
          <mx:FormItem label="Password:">
            <mx:TextInput id="passwordTxt"
              displayAsPassword="true"/>
          </mx:FormItem>
        </mx:Form>
        <mx:ControlBar horizontalAlign="center">
          <mx:Button label="Login" id="loginBtn" click="login(event);"/>
        </mx:ControlBar>
    </mx:Panel>
    ------------------ MainApp.mxml -------------
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
      xmlns:controller="com.westernstates.classes.controller.*"
      xmlns:comp="components.*" viewSourceURL="srcview/index.html">
      <!--
        Because we have broken this application into components, the main application
        file currently does not have much in it. It is possible to argue for simply
        defining the application header here in the main application file, but you
        might use it in other applications or components, so it is implemented as
        a separate component.
      -->
      <!-- The WesternStatesController class. It registers event listeners
        with the systemManager for events that will bubble up the display hierarchy.
        The controller is a non-visual class, although it does extend UIComponent
        so it is on the display list, but it has no visual elements. -->
      <controller:WesternStatesController/> 
      <comp:ApplicationHeader id="appHeader"/>
    </mx:Application>

Maybe you are looking for

  • Problem with Pop up windows and struts

    Hi I have problem in working with pop-up windows and struts. I have parent page which basically lists some data and has a button for adding new record. when I press that button a child windndow will be opened for data entry. The child window has subm

  • Can't open up phots after reinstalling iphoto older version

    Last year my hard drive crashed, and since I had applecare just took it to my apple store and they put in the new hard drive, and updated my OS to Leopard 10.5.8 I had used a program that didn't work as well as I thought for my back ups and had to ma

  • Running with Smartband only

    Hi everyone, I know others have posted about this, but I can't find an answer to my specific problem... I went running today, with my Smartband only, leaving my phone at home. When I got back LifeLog showed my run, down to the closest minute, but the

  • Creating Video for _Sorcerer s Apprentice_

    I have DVDs for F. and for F. 2000. I can create the whole movie on my computer using Cucu.'s iPod DVD & Video Converter Software, or on my wife's new iMac using Handbrake. But I haven't figured out how to create separate videos for each movie chapte

  • My imac randomly shuts down.

    After a little research, I've noticed this is a fairly common problem. Here's where my situation is slightly different. I'm never around my imac when it randomly shuts down. I'm always asleep. It's happened a couple times this week. I was up till 3 i