In Flex application functionality is working sometimes and not working sometimes..

Hi,
Please help me on this..
In my flex application some functionality is working some times and not working sometimes..
In my project i have 5 sections with 5 separate screens..Each screen is of one diffeent module.
After logining into the application:
  I will go to one screen..First time every functionality is working in that screen..
Ex:: I have a screen with datagrid.From that user will select one job name from datagrid click on next button..
Based the job name the user selected i have to display some information in next screen and customer names.customer names is a combo box..
below is the code:::
               public function populateAllOEMCustomers(event:ResultEvent):void
          1)     var object_CustomerList:CustomerList = event.result as CustomerList; //Assigining result object values to Object reference variable.
          2)    var allOEMCustomersCollection:ArrayCollection = new ArrayCollection(); //Declaration ArrayColliction referance variable.
         3)       var i:int=0;
         4)      var customerComboLabel:Label = new Label();
          5)      for (i = 0;i < object_CustomerList.arryCollCustName.length; i++)
                    var strCustName:String = object_CustomerList.arryCollCustName.getItemAt(i).toString();
                    var strCustId:String = object_CustomerList.arryCollCustId.getItemAt(i).toString();
                    customerComboLabel = new Label(); //Dynamic declaration of label.
                    customerComboLabel.name = strCustName; //Assinging the customer name to the Label name field.
                    customerComboLabel.text = strCustId; //Assingning the customer id to the Label text field.
                    allOEMCustomersCollection.addItem(customerComboLabel); //Adding Lable into the ArrayCollection referace variable.                                       
                //customerComboID.selectedItem = "--";   
                OEMCustomersComboID.dataProvider = allOEMCustomersCollection;
                OEMCustomersComboID.selectedItem = -1;
This functionality is working fine when i visit to this screen first time..If you go back to another screen and come back to this same screen and click on next button this time customer names combo box has no customer details..I am getting Nullpointer Exception and it is showing the line number 5( i have given the number for code given above..)
If i change the first line of the code to below code:: every time the above functionality is working fine.Not getting any error msg..
  var object_CustomerList:Object= event.result ;
If i  type cast it to specific class(CustomerList) ,functionality is not working ..getting null pointer exception..If i type cast it to Object everything is working fine..In my code wherever i have typecasted it to specific class functionality is not working(gettingNullpointerExcepion).
Please help me on this..I am not getting what could be the reason..
I am using::Flex 3,Flash player 10.1
Thanks in advance..
Regards,
Satya

Hi Satya,
This sometimes as in your case might not work as the way you have specified the RemoteClass attribute in your AS class. As somtimes there may be a case as before it is mapped to a server side you are returned the data and so that you may not get the data as your Custom class but as normal Object type.
So in order to avoid this you can map the server side class to AS classes in the PreInitialize handler itself as shown below:
Specify the preinitializeHandler in your main application and write the below function.This way also you can map AS classes with the server side. So that you will not have any problem referring your application as AS class types.
You can use the same line for registering all the classes. By using this you can remove all the  [RemoteClass] attributes on all AS classes and include it at single place.
preinitialize="onPreinitialize()"
private function onPreinitialize():void
  registerClassAlias("com.expeditor.ScriptAdmin.Objects.CustomerList", CustomerList);
Here in the above line of code the string in quotes refer to the namespace of the Server side class and the latter is your AS class. Also dont forget to import the namespace of the corresponding AS class in the file.
Try this and let me know..
Thanks,
Bhasker

Similar Messages

  • I have "my story" app on multiple ipads at our school.  It now appears as if this app will function on some ipads and not others.  Is this because the app was pulled off of the itunes store?

    I have "my story" app on multiple ipas at our school.  It now appears as though the app will only function on a few of the ipads.  Is this because itunes pulled the app from the store?

    For any iPad exhibiting this, try a reset: Simultaneously hold down the Home and On buttons until the device shuts down. Ignore the off slider if it appears. Once shut down is complete, if it doesn't restart on it own, turn the device back on using the On button. In some cases it also helps to double click the Home button and close all apps from the tray before doing the reset.
    Is this the app? https://itunes.apple.com/us/app/my-story-story-creator-for/id449232368?mt=8. It appears to be available.

  • How was Does my ID and password function on my computer and not on my Ipod touch?

    ID or pass word are incorret? that what my ipod said, but when i got on itune it's work? need help plz ty

    Wha are you try to do on the iPod?  Try going to Settings>Store and sign out of the account, reset the iPpd and then log in.
    Reset iPod touch:  Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.

  • Why does the BlueCross/BlueShield of Massachusetts website function on Internet explorer and NOT on Firefox?

    The necessary items on some of the BC/BS drop down menus do not appear when using Firefox. I had to open that same provider website in Internet Explorer in order to enter claims correctly. Not sure how a web browser alters content and functionality of websites.

    This is likely because the website is using ActiveX, which is only supported by Internet Explorer (it's very insecure, which is why no other browser supports it).
    You can try:
    * [[Websites look wrong or appear differently than they should]]
    * If that fails, contact the webmaster.

  • A certain set of keys randomly stop working in a Flex application

    My company has a Flex application (version 4.5.1), and certain keys will stop working from time to time when typing in a TextInput (the MX variety).
    Each occurrence has been on a Windows machine.  I have noticed it in Internet Explorer 11, using 15.0.0.152 (developer version), and co-workers have noticed it on other versions of IE (I don't know which Flash Player versions they were using, but they weren't the developer versions).
    About the only major change I can think of that may coincide with this issue would be having to convert a Google Map from using the Flash API to the JavaScript API.
    The keys that have stopped working are: k, m, !, #, $, %, &, (, -, _, =, +, ', " (capital "K" and "M" still work)
    I can still paste these characters into the text box even when the keys aren't working, so it's not an issue with the text box not accepting the characters.  I can have the application open in multiple tabs and have things working normally in 1 tab but not the other.  I have seen the keys stop working and start working again without refreshing the tab.

    Understood.  We have an extensive set of automated regression tests, and in the rare instances where we do break text input, it's an on/off thing.  This is super interesting because it's so weird, but I have zero theories about why it might be happening.
    If it is a Flash bug, there's probably a really long sequence of steps required to get it into a wonky state where this would occur, and the only way that we would figure out what's going on would be to reproduce it under an interactive debugging session.  I'll ask around, but I've been working on the engineering team since 2006 and I've *never* seen this.  I really like crazy stuff like this, but I've got nothing...

  • Error Accessing internet from the flex application.

    Hi
    I am getting the following error while runningm my flex
    application deployed on the OC4J server. The error did not come
    when I was running the application directly from the flex builder.
    However , after deploying it on the application server my
    flex application cannot access the internet and in turn
    throws this error. Does this have anything to do with the
    'crossdomain.xml' file, which most probably does not exist on my
    server. If that is the case, please can somone let me know as to
    where exactly do I put the 'crossdomain' file.
    [RPC Fault faultString="Security error accessing url"
    faultCode="Channel.Security.Error" faultDetail="Destination:
    DefaultHTTP"]
    at mx.rpc::AbstractInvoker/
    http://www.adobe.com/2006/flex/mx/internal::faultHandler()
    at mx.rpc::Responder/fault()
    at mx.rpc::AsyncRequest/fault()
    at ::DirectHTTPMessageResponder/securityErrorHandler()
    at
    flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at flash.net::URLLoader/flash.net:URLLoader::redirectEvent()
    TIA
    ~Shishir

    This file goes in the"root of the web server". Now tis is not
    very helpful so here are some examples:
    IIS default:
    C:\Inetpub\wwwroot
    Flex 1.5 "integrated Jrun" default installation
    C:\Program Files\Macromedia\Flex\jrun4\servers\default
    Tomcat:
    C:\Program Files\Apache Software Foundation\Tomcat
    5.0\webapps
    If in doubt, put one everywhere until it works, then take
    them out until it breaks.
    Use the universal permission until you get it working:
    <allow-access-from domain="*" to-ports="*" secure="true"
    />
    Tracy

  • Cold Fusion/Flex Application Wizard crippled in Trial Version?

    Hi,
    I am using the 60 Day trial version of Flex Builder
    3/Eclipse.
    I wanted to try out the much vaunted Cold Fusion/Flex
    Application Wizard, mainly because I could not get my head around
    access from Flex to an existing CFC from the documentation alone.
    So, I followed the directions:
    Click the plus sign (+).
    In the Name: text box, enter the name for the page.
    Select the page type (master, detail, or master/detail).
    Click Edit Master Form or Edit Detail Form, depending on the
    type of form you are creating.
    The Visual Query Builder starts.
    But for me, when I click on 'Edit Master Form' the Visual
    Query Builder does not start.
    Now I have checked and confirmed that my RDS is working, and
    that I can access the database via RDS in the Eclipse RDS browser
    window. The RDS concerned is on another PC.
    The PC on which Flex Builder is installed is a Vista
    Ultimate/32 and the database is MS SQl server 2005 (running on the
    other PC). Cold Fusion 8 is installed on both PC's.
    So, my question is 'Is the CF/Flex Application wizard
    deliberately hobbled/crippled in Flex 3 Trial version, or is there
    something wrong with my installation.?
    If this works for everyone else, then how do I debug my
    installation ?
    Thanks,
    Bryn Parrott

    in addition, I can say that I installed the same flex builder
    trial on an XP machine, using its own local RDS, and found that the
    wizard worked just fine.
    So what is the variable here, why is the wizard not working
    on the vista PC ?
    Is it Vista ?
    Is it the fact that I'm trying to use RDS against a remote
    server and not the local one ?

  • How to automate flex application

    I have a Flex Application that needs to be automated using tools like HP's QuickTest Pro (QTP) or something. However, QTP requires that you write some custom code if you wish to automate some home-made components... Unfortunately, we have some 3rd-party components which we do not have the source code so we can't really the custom code without having the 3rd-party component's source code and we cannot add some additional SWC files or some other files into the application to automate it. the application is already compiled and we have only the executable file.
    how to automate flex application in above case. it is not possible to add any sort of code to application so can we add some sort of plugin to existing testing tool to automate flex. is there any plug-in available for that and for which tool?
    Any ideas?

    What do you want to automate? Essbase has several different ways of automating functionality including Esscmd, Maxl and several different flavors of APIs (C / VB / Java). The tool you would choose to automate with depends on what you are trying to do.
    If you post more specifics, we could direct you to which tool would be most appropriate and can refer you to the proper docs to get started.
    Tim Tow
    Applied OLAP, Inc

  • Can I embed the Flash Document preview on my Flex Application

    Hi I am creating a Flex application utilizing acrobat document sharing, and I was wondering if I could have it display a preview of my documents very similar to http://share.acrobat.com/adc/.
    I notice that you can embed flash on webpage by the use of this viewer https://share.acrobat.com/adc/flex/mpt.swf, and I tried loading it and appending necessary variables to it, it works but I cannot resize the viewer. I'm not sure if Im doing it wrong or its just the viewer not compatible at all.
    Thanks, I really appreciate if anyone could point me on the right direction.

    I'm sorry, but at present this isn't something that we support. We didn't build the viewer with the intent of allowing others to use it in flex.
    Best Regards,
    Michelle

  • How to display pdf file in flex application

    hi,
    I am Ibran, I am using Flex4.5, in that i want to display a pdf file like images.
    How can i do it please anyone tell me.
    I have used navigateToURL(url),but this was going into navigation and i can't see my textfield and buttons.
    So without this  navigateToURL(url) how can i display a pdf file in flex without navigation so that i can see my textInputs and buttons.

    Flash does not have the ability to load/display/manipulate PDF files, so you can't open it directly in the flex application.  With clever HTML and javascript, you can make it appear that it is in the same window, but it will actually be in a separate window/div in the browser.  And yes, this has always seemed absurd to me that Adobe doesn't support PDF's......
    Mark

  • Flex application is not loading in IE6

    Hi,
    I have requirement .
    One web application will be loading flex application as inline iframe.It is not loading flex app in IE6 where as working fine in IE7.
    Is there any problem with IE6 while loading flex app
    pls help me it is production issue

    what version of flashplayer does it have?
    Flintstones version?

  • Adobe flex application development in NWDS

    Hi All,
    I have to develop an adobe flex application in NWDS.The questions are:
    1.What version of NWDS is required
    2.How do i integrate adobe flex with NWDS
    3.Any tutorial for a sample Adobe flex application development in NWDS
    Thanks and Regards
    Radhika

    Hi,
    Does it have to be NWDS?
    See if this post gives you some answers:
    Integrating Flex into Developer Studio
    Rgds.

  • Origianlly Flex Application not shown properly in google chrome browser

    When I launch my flex application in Google Crome it does not fit properly. It falls short of the full height . On clicking 'restore down' button at top right corner followed by 'maximize' , then the application fully fits within the browser window.
    Any input why it happens ??

    We run our app in Mozilla. I need to check it out in IE.
    I noticed in our app (one of my developers uses Safari on a Macintosh), that the tree control looks much different in Safari, and has huge gaps and blank spots in the text labels of the leaf nodes.
    We logged it as a bug in our app, but it appears it's a bug in the FLEX framework??

  • Session Implementation in flex application

    Hi ,
    I m getting problem in how to implement session in flex
    application.
    Thanks in advance

    I'm not using Flex, but the following preserves session in Flash:
    var url = "http://" + WebServerIPAddress + "/" + ApplicationName + "?data=" + datavalue;
    var cmd:String = "window.open('" + url + "','win','height=768,width=1024,toolbar=no,scrollbars=yes');";
    var request:URLRequest = new URLRequest("javascript:" + cmd + " void(0);");
    navigateToURL(request, "_self");

  • I used to have an application in my iPhone 4 and 4s that captures business card and creates its content to my contacts. Its no longer working with my i5. Can you recommend me a new apps for this same function

    I used to have an application in my iPhone 4 and 4s that captures business card and creates its content to my contacts. Its no longer working with my i5. Can you recommend me a new apps for this same function

    Try CardMunch it works well for me

Maybe you are looking for

  • Error while displaying file " C:Temp Filename.Ext cannot be created"

    Dear Friends Some users face problem while display the file. They get message " C:\Temp\ Filename.Ext cannot be created ". I checked Details. I got explaination as follows. Caution! You are not authorized to work with temporary storage Message no. ED

  • JMS (Transaction ???) problem, consumer receives all messages at once.

    Hallo, I have an application which implements asynch communication between the web and business layer using JMS. On a page a user can upload files, which are processed by the backend. For large files this can be a long running process, thats why we u

  • Links, URLs & bookmarks open in same tab -- not separate tabs so i left ff 17 for FF 16

    no matter how i configure the tabs setting in firefox (open links and new windows in a new tab) , all links, URLs and bookmarks open in the same tab, instead of as separate tabs, unless i first open a new tab and then select/enter the link, URL or bo

  • Oracle workbench

    Does "Oracle Migration Workbench Release 10.1.0.4.0" support mysql ? if so where can i find the plugin for non oracle database it shows only "IBM and Informix" on plugin when i create Repository i get "No plugins are installed. please install the plu

  • Keep getting Error Message (-39) Cant synce Photo's to i-Phone

    Keep getting Error Message (-39) Cant synce Photo's to i-Phone. I've tried restarting my computer, powering down my i-Phone & shutting down i-Tunes but nothing works. Plus i cant email photo's from my i-Phone either.