Change base view state from a custom component

I'm pretty new to flex and I'm having a small issue in change the view state from a component.
My Application have 2 custom components called userlogin and main menu. In the main application page I have userlogin component in one state and the main menu component in another. I'm trying to change the state if the login in successful from user login to main menu. I have the following function written inside the login component.
private function IsUserLoggedIn(evt:ResultEvent):void
                if (evt.result.islogin.toString() == "true")
                    currentState = "MainMenu";
                else
                    Alert.show("Login failed, please try again.", "Login Failed");
This code worked when I had all the controls in the main page. But then I created components and included them in to components and now when the login is success, its giving the following error.
ArgumentError: Undefined state 'MainMenu'.
    at mx.core::UIComponent/getState()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\core\UI Component.as:9908]
    at mx.core::UIComponent/findCommonBaseState()[E:\dev\4.0.0\frameworks\projects\framework\src \mx\core\UIComponent.as:9928]
    at mx.core::UIComponent/commitCurrentState()[E:\dev\4.0.0\frameworks\projects\framework\src\ mx\core\UIComponent.as:9750]
    at mx.core::UIComponent/setCurrentState()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\ core\UIComponent.as:9701]
    at mx.core::UIComponent/set currentState()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\core\UIComponent.as:6087 ]
    at components::UserLoginForm/__btnSubmit_click()[C:\Projects\WarrantyAutomation\src\componen ts\UserLoginForm.mxml:60]
I'm sure this has something to do with accessing the states from a custom component, but I do not know how to change the state to the main menu. Please help me with this. Any help is greatly appriciated.

Hi dasun1981,
private function IsUserLoggedIn(evt:ResultEvent):void
                if (evt.result.islogin.toString() == "true")
                    currentState = "MainMenu";
                else
                    Alert.show("Login failed, please try again.", "Login Failed");
If I am right the above function is in your userlogin component and the two components "userlogincomponent" and "maincomponent" are in main application file and the states were also defined in main application file.
But in the function above the currentState refers to the state of the userlogin component and not the main application ...but the states are defined in main application file...that's the reason why the exception was thrown...
Instead you replace the line in the above function with the below line:
Application.application.currentState = "MainMenu";
Please mark it as answer if it helped you.
Thanks,
Bhasker Chari

Similar Messages

  • Creating a button that leads back into the main Pages/States from a custom component

    Hello Y'all! isnt F.C. awesome!
    BUT... just cant get a button that leads from a custom component ive made back into the main bulk of pages and states ive created to work.
    it runs a bit like this:
    Main title page...
                            Photography...
                                                 Nature (on which theres a Custom Component which when clicked leads to...)
                                                            20 different custom component states each with different pics, linked via buttons
    from each of which id love a button that led back to Photography, exiting the custom component
    ive tried the basics:      Add interaction.. when clicked.. play transition to.. state: Photography
    but to no avail
    any ideas? im at a loss!
    thanks in advance,
    Tom

    Cross component communications are an issue in Flash Catalyst 1.0. Thankfully, in Flash Catalyst 5.5 the team addressed some of those issues.
    The only idea I have for remove the 'return' button from within the component, then it should be able to get you back to the home state.
    Or, you might be able to wait a few weeks for the new version of Flash Catalyst to ship (or you can play with the older preview release on labs.adobe.com)
    Chris

  • States in a custom component

    I am having a problem getting my states to view correctly from a custom component.
    I call in the custom component that has states in it, and they do not view correctly.
    Here is an example:
    The states from my custom component:
    <mx:states>
            <mx:State name="state1">
                <mx:RemoveChild target="{formitem3}"/>
                <mx:RemoveChild target="{hbox4}"/>
                <mx:RemoveChild target="{vbox1}"/>
                <mx:RemoveChild target="{panel24}"/>
                <mx:AddChild relativeTo="{hbox3}" position="before">
                    <components:SensitivityValue2 variableString="Capital Cost Multiplier" unitsString="" close="currentState=''"/>
                </mx:AddChild>
                <mx:RemoveChild target="{button31}"/>
            </mx:State>
            <mx:State name="state2">
                <mx:RemoveChild target="{formitem3}"/>
                <mx:RemoveChild target="{hbox4}"/>
                <mx:RemoveChild target="{vbox1}"/>
                <mx:RemoveChild target="{panel24}"/>
                <mx:AddChild relativeTo="{hbox5}" position="before">
                    <components:SensitivityValue2 variableString="Replacement Cost Multiplier" unitsString="" close="currentState=''"/>
                </mx:AddChild>           
                <mx:RemoveChild target="{button1}"/>
            </mx:State>
    and here is how I am calling in the custom component to my main application:
    <components:MyCustomComp id="customComp" width="100%" height="100%" label="CustomComp"/>

    when you switch to a state (by click a button) it should just move some icons down and
    insert a panel.
    And when you switch back it should just move everything back up and remove the panel.
    What does happen is nothing, or an error, or it adds the panel to a strange location.

  • Locale Input changes on Mac OS X Lion when changing the view state

    On Mac OS X Lion, the following code results of changing the locale input when changing the view state. If you set the input locale to Pynin, then run the application, then click on "go to the test 2", the input locale changes back to english. This is obviously not the correct behavior (the input locale should stay the same as defined on the computer).
    <?xml version="1.0" encoding="utf-8"?>
    <s:WindowedApplication 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[
                protected function gototest2(event:MouseEvent):void
                    this.currentState = "test2";
                protected function gototest(event:MouseEvent):void
                    this.currentState = "test";
            ]]>
        </fx:Script>
        <s:states>
            <s:State name="test" />
            <s:State name="test2" />
        </s:states>
        <s:Button label="go to test" includeIn="test2" click="gototest(event)" />
        <s:Button label="go to test2" includeIn="test" click="gototest2(event)" />
        <s:TextInput includeIn="test2" />
    </s:WindowedApplication>

    Could you please open a new bug report on this over at bugbase.adobe.com?  Please post back with the URL so that others affected can add their comments and votes.

  • Changing states from within a component

    Let's say that I have a TileList that is rendering data in a
    VBox. Eventually the TileList fills up and starts scrolling. I want
    to change states when clicking on item in the TileList.
    I don't want to place the click-attribute in the TileList,
    because it will change states when I am scrolling the list without
    actually selecting anything.
    I want to say click="currentState='state2'" inside the VBox,
    but that does not work because state2 is at the root level, and I
    don't know how to get to the root-level (in lack of a better word)
    from withing the component.
    This is not the proper syntax, so misunderstand me the right
    way here... Is there an equivallence to
    click="currentState='_root.state2'" in mxml?
    Thanks for any suggestions or best practices. I want the easy
    way out.
    This is the general structure...
    <mx:Application>
    <mx:states>
    <mx:State id="state1"/>
    <mx:State id="state2"/>
    <mx:State id="state3"/>
    </mx:states>
    <mx:TileList dataprovider="{...}">
    <mx:itemRenderer>
    <mx:component>
    <mx:VBox id="ClickThisBoxToChangeStates">
    <mx:Image/>
    <mx:Label/>
    </mx:Vbox>
    </mx:component>
    </mx:itemRenderer>
    </mx:TileList>
    </mx:Application>

    Your assumption is right.
    It doesn't work because there is no state2-state defined
    within the mx:component.
    In the documentation about changing states it says that I can
    go from application level and change states within a component;
    like this: click="currentState='mycomponent.anotherstate'" but not
    how I can change a state at application level from within a state.
    When I try, it says (at runtime) that the state is not defined.
    So I don't know why <mx:VBox
    click="currentState='state2'"/> doesn't work.
    I apprechiate your expertese a lot.

  • How to handle value change events of select list in custom component?

    My HelloUIComp code...How to handle events for "Select"...if i choose option1 from select then one text box is to be displayed in custom component and if i choose another option then some other text box is to be displayed in custom components...
    public class HelloUIComp extends UIComponentBase {
        public static final String account="custom.account";
        public static final String RENDERER_TYPE = null;
        HtmlCommandButton button = createButton();
        //HtmlSelectOneMenu select=createSelect();
        public void processDecodes(FacesContext context) {
             Calling the lifecycle method "processDecodes" on the
             internal button is absolutely critical to create action events
             button.processDecodes(context);
             super.processDecodes(context);
        private HtmlCommandButton createButton() {
             FacesContext context = FacesContext.getCurrentInstance();
             HtmlCommandButton newButton = new HtmlCommandButton();
             newButton.setId("Add");
             newButton.setValue("Add");
             newButton.setType("submit");
             //newButton.setOnclick("return func_1(this,event);");
             MethodBinding binding = context.getApplication().createMethodBinding("#{pc_MyProjectView.go}", null);
             newButton.setAction(binding);
                  newButton.setParent(this);
             return newButton;
      /*  private HtmlSelectOneMenu createSelect()
             HtmlSelectOneMenu selectCategory=createSelect();
             return selectCategory;
         public void encodeBegin(FacesContext context) throws IOException {
              String style = (String)getAttributes().get("style");
              String startdate = (String)getAttributes().get("startdate");
              String enddate = (String)getAttributes().get("enddate");
              //String add=(String)getAttributes().get("add");
              ResponseWriter writer = context.getResponseWriter();
             writer.startElement("table", this);
            writer.writeAttribute("border","2","2");
            writer.startElement("tbody", this);
            writer.startElement("tr", this);
            writer.startElement("td", this);
            writer.writeText("Account Category", null);
            writer.endElement("td");
              writer.startElement("td", this);
              writer.writeText("Reg-No", null);
              writer.endElement("td");
              writer.startElement("td", this);
            writer.writeText("Account-No", null);
              writer.endElement("td");
              writer.startElement("td", this);
            writer.writeText("", null);
              writer.endElement("td");
              writer.startElement("td", this);
            writer.writeText("Start-Date", null);
              writer.endElement("td");
              writer.startElement("td", this);
            writer.writeText("End-Date", null);
              writer.endElement("td");
              writer.endElement("tr");
              writer.startElement("tr",this);          
              writer.startElement("td", this);
              writer.startElement("select", this);
            if (style!=null)
                   writer.writeAttribute("style", style, null);
            writer.writeAttribute("name","category","category");
            writer.startElement("option", this);
              writer.writeText("Select", null);
              writer.endElement("option");
              //to access data
              Account accountObj;
              AccountData accountDataobj;
              List listOfAccounts;
              int noOfAccounts;
              accountDataobj=new AccountData();
              listOfAccounts=accountDataobj.getAccounts();
              noOfAccounts=listOfAccounts.size();
              for(int i=0;i<noOfAccounts;i++)
              writer.startElement("option", this);     
              accountObj=(Account) listOfAccounts.get(i);
              writer.writeText(accountObj.getCategory(), null);
              writer.endElement("option");
              //System.out.println(accountObj.getRegNo());
              //System.out.println(accountObj.getAccountNo());
              writer.endElement("select");
              writer.endElement("td");
            writer.startElement("td", this);
              writer.startElement("select", this);
              if (style!=null)
                   writer.writeAttribute("style", style, null);
              writer.writeAttribute("name","regno","regno");
              writer.startElement("option", this);
              writer.writeText("Select", null);
              writer.endElement("option");
              for(int i=0;i<noOfAccounts;i++)
              accountObj=(Account) listOfAccounts.get(i);     
              writer.startElement("option", this);
              writer.writeText(""+accountObj.getRegNo(), null);
              writer.endElement("option");
              writer.endElement("select");
              writer.endElement("td");
              writer.startElement("td", this);
              writer.startElement("select", this);
              if (style!=null)
                   writer.writeAttribute("style", style, null);
              writer.writeAttribute("name","accno","accno");
              writer.startElement("option", this);
              writer.writeText("Select", null);
              writer.endElement("option");
              for(int i=0;i<noOfAccounts;i++)
              accountObj=(Account) listOfAccounts.get(i);
              writer.startElement("option", this);
              writer.writeText(accountObj.getAccountNo(), null);
              writer.endElement("option");
              //writer.startElement("option", this);
              //writer.writeText("00200155", null);
              //writer.endElement("option");
              writer.endElement("select");
              writer.endElement("td");
              writer.startElement("td", this);
              button.encodeBegin(context);
             button.encodeChildren(context);
             button.encodeEnd(context);
            writer.endElement("td");
              writer.startElement("td", this);
              writer.startElement("input", this);
              if (style!=null)
                   writer.writeAttribute("style", style, null);
              writer.writeAttribute("type","text","text");
              writer.writeAttribute("name","startdate","startdate");
              writer.writeAttribute("value",startdate,startdate);
              writer.writeAttribute("readonly", "","");
              //writer.endElement("input");
              writer.endElement("td");
              writer.startElement("td", this);
              writer.startElement("input", this);
              if (style!=null)
                   writer.writeAttribute("style", style, null);
              writer.writeAttribute("type","text","text");
              writer.writeAttribute("name","enddate","enddate");
              writer.writeAttribute("value",enddate,enddate);
              writer.writeAttribute("readonly", "","");
              writer.endElement("td");
              writer.endElement("tr");
              writer.endElement("tbody");
              writer.endElement("table");
         public String getFamily() {
              return "HelloFamily";
         }

    NewEclipseCoder wrote:
    How to handle events for "Select"...if i choose option1 from select then one text box is to be displayed in custom component and if i choose another option then some other text box is to be displayed in custom components...Two ways:
    1) submit the form to the server and render the desired textbox depending on the option.
    or
    2) render all textboxes and use Javascript/DOM to display/hide them depending on the option.

  • Shrink Log file in log shipping and change the database state from Standby to No recovery mode

    Hello all,
    I have configured sql server 2008 R2 log shipping for some databases and I have two issues:
    can I shrink the log file for these databases: If I change the primary database from full to simple and shrink the log file then change it back to full recovery mode the log shipping will fail, I've seen some answers talked about using "No
    Truncate" option, but as I know this option will not affect the log file and it will shrink the data file only.
          I also can't create maintenance to reconfigure the log shipping every time I want to shrink the log file because the database size is huge and it will take time to restore in the DR site, so the reconfiguration
    is not an option :( 
    how can I change the secondary database state from Standby to No recovery mode? I tried to change it from the wizard and wait until the next restore for the transaction log backup, but the job failed and the error was: "the step failed". I need
    to do this to change the mdf and ldf file location for the secondary databases.
    can any one help?
    Thanks in advance,
    Faris ALMasri
    Database Administrator

    1. can I shrink the log file for these databases: If I change the primary database from full to simple and shrink the log file then change it back to full recovery mode the log shipping will fail, I've seen some answers talked about using "No Truncate"
    option, but as I know this option will not affect the log file and it will shrink the data file only.
          I also can't create maintenance to reconfigure the log shipping every time I want to shrink the log file because the database size is huge
    and it will take time to restore in the DR site, so the reconfiguration is not an option :( 
    2. how can I change the secondary database state from Standby to No recovery mode? I tried to change it from the wizard and wait until the next restore for the transaction log backup, but the job failed and the error was: "the step failed". I need to do
    this to change the mdf and ldf file location for the secondary databases.
    can any one help?
    Thanks in advance,
    Faris ALMasri
    Database Administrator
    1. If you change recovery model of database in logshipping to simple and back to full Logshipping will break and logs wont be resored on Secondary server as log chain will be broken.You can shrink log file of primary database but why would you need that
    what is schedule of log backup. Frequent log backup is already taking care of log files why to shrink it and create performance load on system when log file will ultimately grow and since because instant file initilaization is not for Log files it takes time
    to grow and thus slows performace.
    You said you want to shrink as Database size is huge is it huge or does it have lots of free space. dont worry about data file free space it will eventually be utilized by SQL server when more data comes
    2. You are following wrong method changing state to no recovery would not even allow you to run select queries which you can run in Standby mode. Please refer below link to move Secondary data and log files
    http://www.mssqltips.com/sqlservertip/2836/steps-to-move-sql-server-log-shipping-secondary-database-files/
    Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it.
    My TechNet Wiki Articles

  • I am not able to create a JMS connection from a custom component in UCM

    I am trying to create a custom component which makes a JMS connection and inserts messages in JMS Queue.
    THe JMS server is hosted on Weblogic Application Server.
    When the code runs I am getting the factory object and the queue object.
    But when I try to get a connection it throws an error as pasted below.
    WHen I googled the same error It has shown a simliar problem in TOmcat in sun thread
    It said two jar files xerces.jar and xml-apis.jar are obsolete.
    I replaced with the new version.
    still the same problem occurred
    Please help
    Pasting the code and exception here
    Code __________________________________________
    import java.util.Date;
    import java.util.Hashtable;
    import javax.jms.*;
    import javax.naming.*;
    import weblogic.jms.client.WLConnectionImpl;
    import weblogic.jms.extensions.*;
    import javax.rmi.PortableRemoteObject;
    public class SimpleProducer {
    public static void drive() {
    final int NUM_MSGS;
         NUM_MSGS = 93;
    Context jndiContext = null;
    Hashtable<String, String> ht;
              ht = new Hashtable<String, String>();
              ht.put(Context.INITIAL_CONTEXT_FACTORY,
                        "weblogic.jndi.WLInitialContextFactory");
              ht.put(Context.PROVIDER_URL, "t3://punitp52975d:7001");
    try {
         jndiContext = new InitialContext(ht);
    } catch (NamingException e) {
    System.out.println("Could not create JNDI API context: " +
    e.toString());
    System.exit(1);
    ConnectionFactory connectionFactory = null;
    Destination dest = null;
    try {
                   Object home = jndiContext.lookup("CNFT"); // where iiopTestDS is jndi name for my DataSource.
    connectionFactory =(ConnectionFactory)PortableRemoteObject.narrow(home , ConnectionFactory.class);
         Object home1 = jndiContext.lookup("QUEUE2"); // where iiopTestDS is jndi name for my DataSource.
    dest =(Destination)PortableRemoteObject.narrow(home1 , Destination.class);
         /*connectionFactory = (ConnectionFactory) jndiContext.lookup(
    "CNFT");
    dest = (Destination) jndiContext.lookup("QUEUE2");
    System.out.println("connectionFactory,dest "+connectionFactory+dest);*/
    } catch (Exception e) {
    System.out.println("JNDI API lookup failed: " + e.toString());
    e.printStackTrace();
    System.exit(1);
    //WLConnectionImpl connection = null;
    WLConnection connection = null;
    WLMessageProducer producer = null;
    try {
                   System.out.println("Getting Connection "+(WLConnection) connectionFactory.createConnection());
    //connection = (WLConnection) connectionFactory.createConnection();
                   System.out.println("Connection created");
    WLSession session =
    (WLSession) connection.createSession(false, Session.CLIENT_ACKNOWLEDGE);
    producer = (WLMessageProducer) session.createProducer(dest);
    WLMessage message = (WLMessage) session.createTextMessage();
    //TextMessage message = session.createTextMessage();
    for (int i = 91; i < NUM_MSGS; i++) {
    ((TextMessage) message).setText("This is message " + (i + 1));
    Long l = new Date().getTime();
    message.setLongProperty("ReleasedDate",l );
    System.out.println("Sending message: " + ((TextMessage) message).getText());
    producer.send(message);
    producer.send(session.createMessage());
    } catch (Exception e) {
    System.out.println("Exception occurred: " + e.toString());
    } catch (Throwable et) {
    System.out.println("Exception occurred: " + et.toString());
    et.printStackTrace();
    finally {
    if (connection != null) {
    try {
    connection.close();
    } catch (Exception e) {
                             System.out.println("*************Instantiating Producer***************");
    Exception_________________________________________________________________
    Exception occurred: java.lang.NoSuchMethodError: javax.xml.parsers.SAXParserFactory.getSchema()Ljavax/xml/validation/Schema;
    java.lang.NoSuchMethodError: javax.xml.parsers.SAXParserFactory.getSchema()Ljavax/xml/validation/Schema;
    at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.<init>(SAXParserImpl.java:124)
    at com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl.newSAXParserImpl(SAXParserFactoryImpl.java:115)
    at com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl.setFeature(SAXParserFactoryImpl.java:143)
    at weblogic.xml.jaxp.WebLogicSAXParserFactory.<init>(WebLogicSAXParserFactory.java:62)
    at weblogic.rmi.internal.wls.WLSRMIEnvironment.getSAXParser(WLSRMIEnvironment.java:136)
    at weblogic.rmi.internal.DescriptorManager.getDescriptorAsMap(DescriptorManager.java:170)
    at weblogic.rmi.internal.DescriptorManager.getDescriptorAsMap(DescriptorManager.java:159)
    at weblogic.rmi.internal.DescriptorManager.createRuntimeDescriptor(DescriptorManager.java:104)
    at weblogic.rmi.internal.DescriptorManager.getBasicRuntimeDescriptor(DescriptorManager.java:85)
    at weblogic.rmi.internal.DescriptorManager.getDescriptor(DescriptorManager.java:51)
    at weblogic.rmi.internal.DescriptorManager.getDescriptor(DescriptorManager.java:37)
    at weblogic.rmi.internal.OIDManager.makeServerReference(OIDManager.java:194)
    at weblogic.rmi.internal.OIDManager.getReplacement(OIDManager.java:175)
    at weblogic.rmi.utils.io.RemoteObjectReplacer.replaceRemote(RemoteObjectReplacer.java:120)
    at weblogic.rmi.utils.io.RemoteObjectReplacer.replaceObject(RemoteObjectReplacer.java:103)
    at weblogic.rmi.extensions.server.ServerHelper.exportObject(ServerHelper.java:223)
    at weblogic.rmi.internal.OIDManager.initializeDGCServer(OIDManager.java:231)
    at weblogic.rmi.internal.OIDManager.getReplacement(OIDManager.java:144)
    at weblogic.rmi.utils.io.RemoteObjectReplacer.replaceRemote(RemoteObjectReplacer.java:120)
    at weblogic.rmi.utils.io.RemoteObjectReplacer.replaceObject(RemoteObjectReplacer.java:103)
    at weblogic.rmi.extensions.server.ServerHelper.exportObject(ServerHelper.java:223)
    at weblogic.corba.server.naming.ReferenceHelperImpl.exportObject(ReferenceHelperImpl.java:233)
    at weblogic.rmi.extensions.PortableRemoteObject.exportObject(PortableRemoteObject.java:34)
    at weblogic.messaging.dispatcher.DispatcherImpl.export(DispatcherImpl.java:85)

    This is probably related to this other issue http://www.adobeforums.com/webx/.59b7fbab/0.
    Jasmin

  • How to refresh/restore VIEW STATE of a JSF component?   urgent help needed!

    AOA guys,
    I am using Jboss 4.0.5, JSF 1.1.2 and DOJO framework to handle ajax request.
    In my project, I am using A4J hidden fields to store values associated with an html anchor tag and use these values to update <h:outputText> dynamically (an ajax request).
    But when i click that anchor link a more than 15 times the message appears as a prompt that view state couldn't be restored - reload page.
    I think it is because that in JSF 1.1 default value of
    om.sun.faces.NUMBER_OF_VIEWS_IN_LOGICAL_VIEW_IN_SESSION is 15, So i can't store more than 15 View Id of JSF components.
    My Question is:
    _Without shifting to JSF1.2, how can i handle this restore view problem in my Java Code using phase listener or some other way so that if this view state problem will occur it atomatically restore the view ids?_
    Please reply me soon?

    avoid multi post
    http://forum.java.sun.com/thread.jspa?threadID=5229804

  • How change application´s state from a component´s function

    Hi, I´m doing an Flex application,
    I have created a component "usersRegister", that have next
    function:
    private function comprobacionBBDD():void{
    if(numero>0){
    mensaje="Perfect.\n\n\n Wellcome.";
    HERE I WANT CHANGE THE STATE
    }else if(numero==-1){
    mensaje=mensaje+"error1";
    }else if(numero==-2){
    mensaje=mensaje+"Error2 \n\n";
    Alert.show(mensaje);
    The problem is that when in my application I instances the
    component, I would like to change my application´s state when
    the first "if" from the function is true.
    Can you help me??
    thanks in advance, and excuse my bad english.

    Really thanks. I have try it and works perfectly.

  • When I change a property name in a custom component, the flash compiler throws a ReferenceError.

    I'm building a custom Datagrid component, and I had three parameter properties: _columns [Collection], _headerHeight [Inspectable], and _rowHeight [Inspectable]. This all compiled fine, but I needed to change things about the _columns variable, and it made sense to instead create _columnData to store data from a DataProvider. Now it throws a ReferenceError every time I try to Test Movie, saying that the property columnData can't be created, despite listing it in the parameter list in the Flash Professional IDE.
    The only thing I can imagine is that Flash is somehow caching an earlier version of my class, but that the Flash IDE is correctly updating itself according to my metadata when I rebuild the component. I've cleared out all the stuff from ~/Library/Application Support/Adobe/Flash CS5/CodeModel, restarted Flash, even built the component from scratch (using the same class) in a new FLA - nothing has worked.
    The code causing errors is copied below:
    private var _columnData:Object;
    private var _headerHeight:Number = 40;
    private var _rowHeight:Number = 40;
    [Collection(collectionClass="musicone.components.data.DataCollection", collectionItem="musicone.components.controls.datagrid.DatagridColumn", identifier="item")]
    public function get columnData():Object {
         return _columnData;
    public function set columnData(value:Object):void {
         _columnData = value;
         var _forceClass:DataCollection = value as DataCollection;
         //updateColumns();
         draw();
    [Inspectable(type="Number", defaultValue=40)]
    public function get headerHeight():Number {
         return _headerHeight;
    public function set headerHeight(value:Number):void {
         _headerHeight = value;
         draw();
    [Inspectable(type="Number", defaultValue=40)]
    public function get rowHeight():Number {
         return _rowHeight;
    public function set rowHeight(value:Number):void {
         _rowHeight = value;
         draw();

    I would reccomend that you not use scenes for that purpose, not exactly sure why  but scenes are unreliable. Try putting all of your content in one scene, one timeline and just add a few stop() 's at the end of each "scene", then in your code remove scene2 and scene3 three references, and you'll possibly need to change frame anchors/targets also if you have them.
    The error indctates that you have called an object that does not exist at the time the code is run, check where you placed your code, should be frame one, scene1, and also check if you have objects entering the stage down the timeline, that do not enter in frame 1, possibly the movieClip? if so add another keyframe on your actions layer on the same frame as the object and enter the call function for it there.

  • ViewObject Row doesn't change it's state from Row.STATUS_NEW after commit ?

    Hi All,
    i have the following problem:
    In my Application i have a logic which is based on View Object Row state .
    I have the following common problem scenario:
    I'm creating a new Row and putting it into state Row.STATUS_INITIALIZED.
    After modifying the Row attributes it goes in Row.STATUS_NEW (which is correct).
    After executing transaction COMMIT i'm expecting the Row state to be changed to status
    UNMODIFIED (similar as an entities). However this not happens , the Row is still in state
    Row.STATUS_NEW. The entities on which are based the View Object change their statuses
    correctly (they go from NEW to UNMODIFIED state).
    I doesn't find any details about switching View Object Row state (except from INITIALIZED to NEW and vice versa)
    in the documentation, so i'm wondering is this framework behaviour correct ?
    Thanks in advance,
    Krasimir

    You're mixing up the newRow state and the row state (which does not exist for a view row in that way).
    The newRow state can only have values STATUS_INITIALIZED and STATUS_NEW.
    The row state that you want is basically the row state of the updateable entities contained in the row.
    If you want to expose that entity state as row state then follow instructions (example 46) here:
    http://blogs.oracle.com/smuenchadf/examples/
    Sascha

  • How to change Bulk Insert statement from MS SQL to Oracle

    Hi All,
    Good day, I would like to bulk insert the content of a file into Oracle db. May I know how to change the below MS SQL syntax to Oracle syntax?
    Statement statement = objConnection.createStatement();
    statement.execute("BULK INSERT [TBL_MERCHANT] FROM '" MERCHANT_FILE_DIR "' WITH ( FIELDTERMINATOR = '~~', ROWTERMINATOR = '##' )");
    Thanks in advance.
    cs.

    Oracle SQL Loader utility allows you to insert data from flat file to database tables.
    Go to SQL Loader links on following url to learn more on this utility
    http://otn.oracle.com/docs/products/oracle9i/doc_library/release2/server.920/a96652/toc.htm
    Chandar

  • Calling a function from a custom component

    I got source files from another company that did a flex project for us before I started working here.  They have custom compenents (mxml files) that they are currently calling public functions in, but when I add a new public function to the mxml component, it won't allow me to call that function.  It tells me it can't access a property of a method of a null object reference... but it still calls the function that was there before I started working with the file..
    I cleaned the project, and did a "build all" but can't figure out why it won't allow me to create new public functions to call.... can anyone tell me why?

    I have the partsLocator_panel in the mxml
    not sure what "new" is with that... first time working with custom components, but it looks like your just working with custom classes in AS3...
    <mx:Panel 
    width="100%" height="100%" layout="absolute" styleName="DashboardPanel" title="PARTS LOCATER" backgroundAlpha=".6" id="partsLocater_panel">
    <mx:Image x="10" y="38" source="assets/icons/gear.png"/>  
    <mx:Image x="10" y="63" source="assets/icons/gear.png"/>  
    <mx:Image x="10" y="89" source="assets/icons/gear.png"/>  
    <mx:Label x="40" y="39" text="Block 30" width="227" styleName="DashboardText" click="openParts()"/>  
    <mx:Label x="40" y="63" text="Block 40" width="227" styleName="DashboardText" color="#9D9D9D"/>  
    <mx:Label x="40" y="88" text="Block 50" width="227" styleName="DashboardText" color="#9D9D9D"/>  
    </mx:Panel>

  • "Best practice" for accessing a class from a custom component?

    My app utilizes a simple class to hold global properties such as username, session data, and similar data. The class is initialized at app startup via code similar to: appGlobals:myGlobals=new myGlobals.
    Many of the custom MXML components and AS classes need to access that data. I have been able to work with it using Application.application.appGlobals.propertyname.
    Is this method the best way to communicate from components and classes to a class initiated at the application level, or should I learn something new before I build a lot of code on this method?
    Thanks.
    Paul

    The WizardModel class is interesting, it is a "singleton" where it is designed to only have one instance, and the class actually has a static variable of its own class. Because that variable is static, an instance is created the first time the class is accessed.
    As to where the WizardModel is "first accessed" and thus its own variable of type WizardModel instantiated, is hard to say, as you really need to understand the application and component startup lifecycle indepth. I have a certain depth of knowledge of that but not enough depth to say definitively when WizardModel  is first accessed, but here are some possibilities:
    WizardModel.wizardTitle = WizardModel.wizardTitleBase;      In the WizardController "wizardTitleChangeHandler" event handler
    creationComplete="WizardModel.app = this;"      In the Wizard.mxml main app creationComplete handler
    <mx:Panel title="{WizardModel.wizardTitle}" width="100%" height="100%">    Opening tag of Panel in Wizard.mxml
    I know its confusing, but just try to absorb what you can for now, and over time it will become gradually more clear.

Maybe you are looking for

  • Witholding tax rates

    Dear All, How do we change the applicable rate of witholding tax to a existing vendor if there is a change in the tax rates at Macro level. Kindly give solution. Thanks

  • Help matching color profiles for 2 displays??

    I have two cinema display monitors (one new, the other 1 year old), and I can't get them to share a color profile. Through SysPrefs I can calibrate them individually, but the results look completely different. The older monitor appears "pinker" overa

  • Air programs without having flash

    Can you run Air programs without having flash installed?

  • Can I make my class files executables on Windows platform?

    I have got a very interesting java program, which I have already compiled into a class file. What I want to do now is to make the bytecodes into an executable file on Windows, like any other .exe files. If possible, how do I do that? Will anyone be a

  • Queston on DAQ using Visual C++

    I'm new to DAQ programming. I want to use Visual C++ 6.0 to do data acquisiton on DAQ card. I can find some examples in NI's package. Although the examples are said to be VC++ examples, but they are really C style example, not C++. Does anybody here