In Flex application feature sometimes works and sometimes does not...

Hello

Please help me on this...

In my flex application features works sometimes and doesn't work sometimes does not...

In my project, I have 5 sections with 5 separate screens... Each screen is a module of different.

After logining in the application:

I'll go to a screen... First time each feature works in this form...

Ex: I have a screen with datagrid. This user select name from a datagrid job click on the next button...

According to the name of the selected user work, I display information on the next screen and customer names.customer whose name is a drop-down list box.

Here is the code:

public void populateAllOEMCustomers(event:ResultEvent):void
{

1) var object_CustomerList:CustomerList = event.result as CustomerList; the values of the object //Assigining the object reference variable result.

(2) var allOEMCustomersCollection:ArrayCollection = new ArrayCollection(); Variable declaration ArrayColliction referance.

(3) var i: int = 0;
(4) var customerComboLabel:Label = new Sun;

(5) for (i = 0; i < object_CustomerList.arryCollCustName.length; i ++)
{
var strCustName:String = object_CustomerList.arryCollCustName.getItemAt (i) m:System.NET.SocketAddress.ToString ();
var strCustId:String = object_CustomerList.arryCollCustId.getItemAt (i) m:System.NET.SocketAddress.ToString ();

customerComboLabel = new Sun; Dynamic Declaration of the label.

customerComboLabel.name = strCustName; Assinging the customer name in the label name box.
customerComboLabel.text = strCustId; Assingning the customer id in the text box on the Label.

allOEMCustomersCollection.addItem (customerComboLabel); Addition of Lable in the referace ArrayCollection variable collection.
}
customerComboID.selectedItem = ' - ';.
OEMCustomersComboID.dataProvider = allOEMCustomersCollection;
OEMCustomersComboID.selectedItem = - 1;

}

This feature works very well when I visit the first time on the screen... If you go back to another screen and return to the same screen and click the button following this names combo box customer time has no customer Details... I get Nullpointer Exception and it shows the number of the line 5 (I gave the above code number..)

If I change the first line of the code to the following: each time the feature above works fine. Not getting no not an error msg...

var object_CustomerList:Object = event.result;

If I type cast in specific class (CustomerList), the feature does not work... do null pointer exception... If I type cast to object everything works fine... In my code each time I'm typecasted for the features of the specific class is not working (gettingNullpointerExcepion).

Please help me on this... I don't get what could be the reason...

I am using::Flex 3, Flash player 10.1

Thanks in advance...

Kind regards

Satya

Hi Satya,

This sometimes as in your case may not work the way you have specified the RemoteClass attribute in your AS class. Because sometimes there may be a case because before it is mapped to a server-side, you are returned to the data and so that you can not get your custom class data but as normal object type.

So to avoid this, you can map the class server-side for as classes in the Manager PreInitialize itself as shown below:

Specify the preinitializeHandler in your main application and write the function below. That way, too, you can map as classes on the side server. So you will have no problem referring to your application AS class types.

You can use the same line for recording of all classes. Using this, you can remove all of the [RemoteClass] attributes on all CLASSES and attach it to the unique place.

preinitialize = "onPreinitialize ()" "

private function onPreinitialize (): void
{
registerClassAlias ("com.expeditor.ScriptAdmin.Objects.CustomerList", list of clients);
}

In the line above the quoted string code refer to the namespace of the class on the server side and the second is your AS class. Also, remember to import the namespace from the correspondent as a class in the file.

Try this and let me know...

Thank you

Jean Claude

Tags: Flex

Similar Questions

  • Error: CreateFile (C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\~e5d141.tmp I receive this error when opening certain programs that worked and now does not.)

    Original title: error: CreateFile (C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\~e5d141.tmp

    I'm getting this error when opening certain programs to work and now are not. I have studied this particular error and did not find a lot about it or how to fix it.

    I don't think it's a virus.

    I don't know what to do, I tried restores system, right click and run as administrator, I did ensure that allows the firewall thing and completely uninstall and reinstall.

    If you know a way to solve this problem it would be greatly appreciated.

    Delete all files in the temp folder and see if you still receive the error.

    Let us know if that helps.

  • Windows Vista - all programs 'stopped working' and nothing does not open. McAfee is also not working and help and support center does not even

    On my windows vista computer, whenever I turn on my computer and log on, none of my programs work. An error message appears saying that the program has stopped working and windows will try to find a solution to the problem.  The problem is that the help and support center opens either. None of my internet programs to be open, and the same error message for all. We have tried to turn off DEP, and that did not help. My computer is connected to the internet (2wire) but is not able to run due to the problems with my computer. I scanned my computer with windows defender, and we found no problem. Help, please

    Hi Anna1298,

    ·         Did you do changes on the computer before the show?

    Follow the suggestions below for a possible solution:

    Method 1:

    Step 1: Start in safe mode and check if the problem persists.

    Start your computer in safe mode

    http://Windows.Microsoft.com/en-us/Windows-Vista/start-your-computer-in-safe-mode

     

    Step 2: If the problem does not occur in safe mode, you can put your system to boot (in normal mode) to solve the problem.

    How to troubleshoot a problem by performing a clean boot in Windows Vista or in Windows 7

    http://support.Microsoft.com/kb/929135

     

    Note: After troubleshooting, be sure to configure the computer to start as usual as mentioned in step 7 provided in the above article.

    Method 2: Try the SFC (System File Checker) scan on the computer.

     

    How to use the System File Checker tool to fix the system files missing or corrupted on Windows Vista or Windows 7

    http://support.Microsoft.com/kb/929833

     

    Method 3: I also suggest that you scan your computer with the Microsoft Security Scanner, which would help us to get rid of viruses, spyware and other malicious software.

    The Microsoft Security Scanner is a downloadable security tool for free which allows analysis at the application and helps remove viruses, spyware and other malware. It works with your current antivirus software.

    http://www.Microsoft.com/security/scanner/en-us/default.aspx

     

    Note: The Microsoft Safety Scanner ends 10 days after being downloaded. To restart a scan with the latest definitions of anti-malware, download and run the Microsoft Safety Scanner again.

    Important: During the scan of the hard drive if bad sectors are found, the scanner tries to repair this sector, all available on which data may be lost.

    Let us know if that helps.

  • Windows Explorer says he has stopped working and it does not restart. I tried the system restore, but will not return to explore

    I can't get rid of this pop up asking to restart or online solutions. I chose these two options in the last days and even managed to get into the restoration of the system (not easy without windows), but nothing works and I'm about to throw this pop up window with my laptop.

    '

    Hello

    References to Vista also apply to Windows 7.

    What antivirus/antispyware/security products do you have on the machine? Be one you have NEVER
    on this machine, including those you have uninstalled (they leave leftovers behind which can cause
    strange problems).

    ----------------------------------------------------

    Follow these steps:

    Try these to erase corruption and missing/damaged file system repair or replacement.

    Start - type this in the search box-> find COMMAND at the top and RIGHT CLICK – RUN AS ADMIN

    Enter this at the command prompt - sfc/scannow

    How to fix the system files of Windows 7 with the System File Checker
    http://www.SevenForums.com/tutorials/1538-SFC-SCANNOW-Command-System-File-Checker.html

    How to analyze the log file entries that the Microsoft Windows Resource Checker (SFC.exe) program
    generates in Windows Vista cbs.log
    http://support.Microsoft.com/kb/928228

    Also run CheckDisk, so we cannot exclude as much as possible of the corruption.

    How to run check disk in Windows 7
    http://www.SevenForums.com/tutorials/433-disk-check.html

    ==========================================

    After the foregoing:

    How to troubleshoot a problem by performing a clean boot in Windows Vista or
    Windows 7

    http://support.Microsoft.com/kb/929135

    Use advanced tools to solve performance problems in Windows 7
    http://www.howtogeek.com/HOWTO/6152/use-advanced-tools-to-troubleshoot-performance-problems-in-Windows-7/

    Problems with the overall speed of the system and performance
    http://support.Microsoft.com/default.aspx/GP/slow_windows_performance?p=1

    How to troubleshoot performance issues in Windows Vista
    http://support.Microsoft.com/kb/950685

    Optimize the performance of Microsoft Windows Vista
    http://support.Microsoft.com/kb/959062
    To see everything that is in charge of startup - wait a few minutes with nothing to do - then right-click
    Taskbar - the Task Manager process - take a look at stored by - Services - this is a quick way
    reference (if you have a small box at the bottom left - show for all users, then check that).

    How to change, add or remove startup programs in Windows 7
    http://www.SevenForums.com/tutorials/1401-startup-programs-change.html

    A quick check to see that load method 2 is - using MSCONFIG then put a list of
    those here.
    --------------------------------------------------------------------

    Tools that should help you:

    Process Explorer - free - find out which files, key of registry and other objects processes have opened.
    What DLLs they have loaded and more. This exceptionally effective utility will show you even who has
    each process.
    http://TechNet.Microsoft.com/en-us/Sysinternals/bb896653.aspx

    Autoruns - free - see what programs are configured to start automatically when you start your system
    and you log in. Autoruns also shows you the full list of registry and file locations where applications can
    Configure auto-start settings.
    http://TechNet.Microsoft.com/en-us/sysinternals/bb963902.aspx
    Process Monitor - Free - monitor the system files, registry, process, thread and DLL real-time activity.
    http://TechNet.Microsoft.com/en-us/Sysinternals/bb896645.aspx

    There are many excellent free tools from Sysinternals
    http://TechNet.Microsoft.com/en-us/Sysinternals/default.aspx

    -Free - WhatsInStartUP this utility displays the list of all applications that are loaded automatically
    When Windows starts. For each request, the following information is displayed: Type of startup (registry/Startup folder), Command - Line String, the product name, Version of the file, the name of the company;
    Location in the registry or the file system and more. It allows you to easily disable or remove unwanted
    a program that runs in your Windows startup.
    http://www.NirSoft.NET/utils/what_run_in_startup.html

    There are many excellent free tools to NirSoft
    http://www.NirSoft.NET/utils/index.html

    Window Watcher - free - do you know what is running on your computer? Maybe not. The window
    Watcher says it all, reporting of any window created by running programs, if the window
    is visible or not.
    http://www.KarenWare.com/PowerTools/ptwinwatch.asp

    Many excellent free tools and an excellent newsletter at Karenware
    http://www.KarenWare.com/

    ===========================================

    Think about it an absolute must - manually update your drivers.

    Vista and Windows 7 updated drivers love then here's how update the most important.

    This is my generic how updates of appropriate driver:

    This utility, it is easy see which versions are loaded:

    -Free - DriverView utility displays the list of all device drivers currently loaded on your system.
    For each driver in the list, additional useful information is displayed: load address of the driver,
    Description, version, product name, company that created the driver and more.
    http://www.NirSoft.NET/utils/DriverView.html

    For drivers, visit manufacturer of emergency system and of the manufacturer of the device that are the most common.
    Control Panel - device - Graphics Manager - note the brand and complete model
    your video card - double - tab of the driver - write version information. Now, click on update
    Driver (this can do nothing as MS is far behind the certification of drivers) - then right-click.
    Uninstall - REBOOT it will refresh the driver stack.

    Repeat this for network - card (NIC), Wifi network, sound, mouse, and keyboard if 3rd party
    with their own software and drivers and all other main drivers that you have.

    Now in the system manufacturer (Dell, HP, Toshiba as examples) site (in a restaurant), peripheral
    Site of the manufacturer (Realtek, Intel, Nvidia, ATI, for example) and get their latest versions. (Look for
    BIOS, Chipset and software updates on the site of the manufacturer of the system here.)

    Download - SAVE - go to where you put them - right click - RUN AD ADMIN - REBOOT after
    each installation.

    Always check in the Device Manager - drivers tab to be sure the version you actually install
    presents itself. This is because some restore drivers before the most recent is installed (sound card drivers
    in particular that) so to install a driver - reboot - check that it is installed and repeat as
    necessary.

    Repeat to the manufacturers - BTW in the DO NOT RUN THEIR SCANNER device - check
    manually by model.

    Look at the sites of the manufacturer for drivers - and the manufacturer of the device manually.
    http://pcsupport.about.com/od/driverssupport/HT/driverdlmfgr.htm

    Installation and update of drivers under Windows 7 (updated drivers manually using the methods above
    It is preferable to ensure that the latest drivers from the manufacturer of system and device manufacturers are located)
    http://www.SevenForums.com/tutorials/43216-installing-updating-drivers-7-a.html

    If you update the drivers manually, then it's a good idea to disable the facilities of driver under Windows
    Updates, that leaves about Windows updates but it will not install the drivers that will be generally
    older and cause problems. If updates offers a new driver and then HIDE it (right click on it), then
    get new manually if you wish.

    How to disable automatic driver Installation in Windows Vista - drivers
    http://www.AddictiveTips.com/Windows-Tips/how-to-disable-automatic-driver-installation-in-Windows-Vista/
    http://TechNet.Microsoft.com/en-us/library/cc730606 (WS.10) .aspx

    ===========================================

    Refer to these discussions because many more excellent advice however don't forget to check your antivirus
    programs, the main drivers and BIOS update and also solve the problems with the cleanboot method
    first.

    Problems with the overall speed of the system and performance
    http://support.Microsoft.com/GP/slow_windows_performance/en-us

    Performance and Maintenance Tips
    http://social.answers.Microsoft.com/forums/en-us/w7performance/thread/19e5d6c3-BF07-49ac-a2fa-6718c988f125

    Explorer Windows stopped working
    http://social.answers.Microsoft.com/forums/en-us/w7performance/thread/6ab02526-5071-4DCC-895F-d90202bad8b3

    I hope this helps.

  • Problems with FP 10.3.183.7 upgrade - did not work and now does not download

    Information on the current system:

    Windows 7 (64-bit)

    Internet Explorer 9 (using 32 bits to download FP)

    I upgraded to 10.3.183.7 and immediately noticed my laptop cannot display/use of the Flash features (facebook, prospectus online, video games, etc.)

    I uninstalled and installed several times using Control Panel both the program uninstaller provided on the Adobe support page. I restarted my laptop after each installation and after each uninstall. I made sure to use 32-bit IE every time.

    The first programs (and control panel) showed the PS as installed but now it records not installed at all - other than the installer telling me it is installed.

    After the installation, on the Adobe page 'test' instead of spinning F I see a box with an 'x' in the upper left corner (as a picture/graphic that doesn't load).

    I tried the version FP 11 beta but same problem. He showed at least on my list of programs. I uninstalled and am back to 10.3 FP

    I've been on the help page try everything I can find to get it to work, but no luck so far. Any advice for this problem?

    Thank you

    Jill

    function() {return A.apply (null, [this] .concat ($A (arguments)))}

    jfer045 wrote:

    FP appears in my control panel to uninstall but does not appear in my list of programs. I downloaded Google Chrome and FP seems to work with it (although I'm not a big fan of the browser) then, there seems to be a problem in IE?

    Flash Player does not appear in the program files, because it is not a (standalone) executable file player; just a browser add-on.

    See these two entries in the FAQ about potential problems of IE9:

  • HP Officejet 4620: hpeprint used to work and now does not work

    I've registered to use hpeprint for a number of years and it has worked very well, although I don't use it very often. I had the opportunity to use it today and it doesn't seem to work. The printer is wireless and is great for everything else is not a local problem for me. I received an email from HP indicating that the print job has been received in too. Still not printing.

    Thank you very much for your help!

    PS Subsequent investigations said that "I have not all registered devices! Then when I put my claim code in the to add it again, the message says:

    "The request window that has already expired. Click on "what is a claim code?" below for instructions on how to print the fact sheet Web Services for re - activate the code request for 48 hours. »

    that I don't really understand! Sorry for being a thicko!

    Hey @JimRobinBSc,

    Welcome to the Forums of HP Support!

    I see that you have some problems with ePrint on your Officejet 4620 e-all-in-one printer. I can help you with that.

    First, a code of request is a way for HP connected connect a printer to an account. It has no use outside. That said, if the printer does not appear in the devices on the connected HP, this means that we connect the printer again. To do:

    1. On the printer, click the web services button that looks like a tablet with a phone beside her.
    2. If you see an email address click settings, scroll to remove Web Services and press on this subject to be deleted. When finished, click the web services button again.
    3. Press Setup and Yes. The printer should print a new claim code.
    4. Enter the claim code in the place under the devices tab which requires the claim code.

    Please let me know if this allows you to use ePrint or if you have any other questions. If not, have a great week!

    If it solves your problem, please help other users find this thread by clicking on accept Solution below my post.

    If you appreciate my help, please inform other users by clicking on the icon below my post thumbs up.

  • Windows Vista - all programs 'stopped working' and nothing does not open. McAfee is also not working and the help and support center/internet does not open even

    On my windows vista computer, whenever I turn on my computer and log on, none of my programs work. An error message appears saying that the program has stopped working and windows will try to find a solution to the problem.  The problem is that the help and support center opens either. None of my internet programs to be open, and the same error message for all. We have tried to turn off DEP, and that did not help. My computer is connected to the internet (2wire) but is not able to run due to the problems with my computer. I scanned my computer with windows defender, and we found no problem. Help, please

    Download the McAfee tool to remove it. Use it in safe mode.

    http://download.McAfee.com/Products/Licensed/cust_support_patches/MCPR.exe

    Reboot and install MSE.

  • Microsoft 2010 Starter has stopped working - and it does not open. any suggestions?

    Computer is a HP Pavilion series g with Windows 7 Home

    The problem is that Microsoft Starter 2010 has stopped working and will not open. When I try to open it I get this message "starter stopped working - go to control panel to set" but I do not know how to fix it - can anyone help please?  Thank you hjmm

    Hello

    Please follow the instructions from the following link for repair:

    http://Office.Microsoft.com/en-us/Excel-Help/Update-repair-or-uninstall-Office-click-to-run-products-HA010382089.aspx

    Good luck.

  • Applications in the games and accessories does not open.

    When I click with the right button on the program, say the painting and choose Properties, she says, they are located in the System32 folder, but they will not even open when I click on them directly. I think that is why my last Windows Update will not install, because this is a security fix for the painting.

    Hello
     
    1. don't you make changes on the computer before the issue started?
    2. this happens with all applications that are located in the games and accessories?
    3 have you tried to launch the program from its target location?
     
    First try to open the program from its location of the target. To know the location of the target and the name of the program, right click on the program item in the start menu, and then click Properties.
    By default, the target location is % windir%\System32.
     
    Try these steps and check the result.
    Step 1: Turn off non-Microsoft programs, and then try to open the start menu applications.
    Follow step 1 to perform a clean boot to disable all non-Microsoft programs: http://support.microsoft.com/kb/929135
    If the problem does not persist in the boot, it means that some programs non-Microsoft is causing this issue. To find out which program is the cause, try step 2 to step 6 to find the culprit: http://support.microsoft.com/kb/929135
    NOTE: Follow step 7 to start the computer in normal mode: http://support.microsoft.com/kb/929135
     
    Step 2: Sfc scanner to fix corrupted system files.
    1. open an elevated command prompt. To do this, click Start, click programs, accessories principally made, right-click Guest, and then click Run as administrator. If you are prompted for an administrator password or a confirmation, type the password, or click on allow.
    2. type the following command and press ENTER: sfc/scannow
     
    The sfc/scannow command. analyzes all protected system files and replaces incorrect versions with appropriate Microsoft versions.
    For more information, see this link: http://support.microsoft.com/kb/929833
     
    I hope this helps.
    Post back with the results, so that we can help you further.
     
    Kind regards
    Syed
    Answers from Microsoft supports the engineer.
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • How can I download Youtube videos on my mac? Real used to work and it does not longer.

    I can't download YouTube more. I have FF 20.0 and use mac os x 10.8. Real used to work, but no more.

    Hello tabarsi, you can use one of the many extensions available in addons.mozilla.org.

  • Scroller sometimes does not

    I have a vertical scroller in my application that sometimes does not recognize the scroll events. The problem seems to occur at random. For example, when you perform a "drag up" gesture to scroll down, about 70% of the time it works as you would expect and 30% of the time that nothing happens. Sometimes, I have to pass several times so he can finally scroll. It's very frustrating.

    The scroll in question contains 6 sprites. Each sprite is around 400 PX in height and has a labels 4 or 5 and a chart, which is a simple custom sprite object, I created using DrawPath. Content is not too heavy, it runs pretty smooth when it works.

    Everyone has similar problems with the class of a scroller QNX?

    Nevermind, I figured it.

    There was a sprite on top of the wheel that had the visibility set to false (a popup), and despite the visibility set to false, it seems that it was sometimes interfere with key events. I moved the popup off the screen and everything works great now

  • Wolf 3D and SoD does not work on Windows7 32 bit but it does in Windows XP?

    I have already downloaded versions freeware and shareware of best games in existence! (Wolf3D and Spear of Destiny, nested DOS, original version) In Windows XP, it worked well, all I get under Windows 7 Home Premium 32 bit is a black window feared, blinking icon and the opportunity to do nothing but close the window!

    I tried to run the application in compatibility mode with previous versions of Windows (including Windows 95!) But Windows 7 is so automatic that I can't change any settings.

    Not much of a computer geek, but Microsoft seem to think that something before 2007 is not worth worrying about

    Can anyone help?

    Hello littleoldme.

    I would suggest running DOS games in a BACK emulator like DOSBox http://www.dosbox.com/, Windows did not have a good DOS since Windows 98 mode. Paul Smith - MVP for Windows desktop experience... I crawled off NNTP - for now. Detachment Aldershot, United Kingdom. On the internet at windowsresource.net and dasmirnov.net. Please post back to let us know what works and what does not. :-)

  • just installed windows 8.1 but the webcam and Bluetooth does not work

    I just installed windows 8.1 on hp laptop 430 but now my webcam doesn't work and onboard microphone does not work and bluetooth does not work also. Please give me a soloution.

    Thankz in advance

    Hello Shehanf93

    Thanks for posting on the HP Forums!

    I understand that you have a problem with your laptop. However, since it is a commercial laptop, you should post your question on the map cell of the HP Enterprise Forums for a better answer.

    Have a wonderful day!

    Mario

  • When you try to watch tv in Windows Media Center, I get black screen and audio sometimes and sometimes does not.

    Black screen in Windows Media Center during the TV

    When you try to watch tv in Windows Media Center, I get black screen and audio sometimes and sometimes does not. Any fix for it?

    TV works on the other program I have and has been workign on MC last week, but now I don't?

    Some success with this issue (its OK, but BLACK) video for live/recorded TV

    ' 1) ' disabled ' tuner card (Ati HD 650 PCIe) TV [via right click] in the Device Manager
    (2) restart Win7 64-bit
    (3) Win7 located & reinstalled the drivers
    (4) VOILA!   Real video and audio live & recorded TV

    BTW - before above fix in Device Manager:
    Notice anything in his video & Game Controllers
    'Properties' reported 'this device is functioning.
    "Update drivers" reported "... software driver...»
    ... and no updates of WMC anywhere in sight

    Go figure!

  • HP 530 keyboard and battery sometimes does not

    Hi all

    I would like to apologize if this topic already exists, I tried to find it but withouth success.

    I'm rather curious problem.

    The laptop my sister HP 530 keyboard sometimes does not work. (I thought it was the problem of the OS so I reinstalled Windows 7 32 bit - yes I know, 1 GB of ram is not enough, but it worked very well avant-probleme remains after a few reboots)

    All the drivers are installed and up to date (not 'things' yellow in Device Manager).

    To be more specific I will try to explain the problem closely.

    When I turn on laptop sometimes keyboard does everything just as it is not connected, but the Device Manager indicates that it is connected. After that, I have to restart several times (once 8 time!) until the keyboard work again.

    Also, at the same time where the keyboard does not work, Windows indicates that the battery is not detected. If the keyboard works, battery is detected, too.

    Would it be a program crashes?

    Y at - is it possible to fix this software based or there need for disassembly of the laptop?

    Thanks in advance for your answer!

    You may need to do the following with a USB keyboard plugged into one of the available USB ports if it is currently unresponsive keyboard of the laptop.

    In Windows go to the ORB start and click on it. Type cmd the command icon that appears above, tight-click it and select run as administrator.

    In the command line window that appears, type sfc/scannow, and then on enter. Inspect system files and replace those it considers corrupt, this will allow the Windows System File Checker. Let it run until the end.

    I hope that your results will be the same as those in the following image. If corrupted files were found and replaced, the system file checkler will advise you of this.

    For the number of battery:

    Plug the power adapter.

    Go to Device Manager and click on the triangle to the left of the battery unit to decompress. DUninstall compatible control method battery Microsoft ACPI. Make a right-click any device and select search the hardware changes. The operating system should recognize the installed battery and compatible ACPI Microsoft previously uninstalled reinstall the battery method device control. Close Device Manager, and then restart your laptop. Login and look in the systray to see if you can now see the loading icon.

    If you still don't see no change, then you need to enter the BIOS and run the diagnosis of the battery. View the results here.

    Is your laptop out of warranty?

    If your answer is no and the results of the diagnostic test was a failure, or no battery has been recognized, then it is time to replace the battery with a new one. There is no obligation to replace it with a genuine part of HP. There are several online vendors who will provide you with a compatible battery replacement guaranteed.

Maybe you are looking for