Show progress bar while module loads

I have a TabView where each tab is a module. One of the
modules has a lot of child components and when I click to activate
that tab - it takes 2-3 seconds to load. During this time OSX shows
the beach ball.
Is it possible for me to show a loading progress bar instead?
Should I be pre-loading all the modules when the application loads,
or at some other point? If so, how do I do this?
Any suggestions would be appreciated.

Hey Jason,
I'm not sure who moderates, but I can send you in the right
direction.
Short answer: Look around for Asynchronous Flex demos
Long answer:
The interfaces locks up (beach ball/hour glass) because the
main application 'thread' is busy with the task you asked of it.
This can, in many different languages, cause a freeze. Javascript,
Native Mac or Windows applications, apparently Flex too.
Running one task at a time is considered a synchronous
(serial) request. What you need to do is make an asynchronous
(parallel) request. In the web world, that's the 'A' in Ajax. By
making asynchronous requests, you free up the main 'thread', while
a separate worker thread is off completing the task. This keeps
your interface responsive.
I think that leads to event listeners.. Send off a background
request, but listen for it to complete. Link the listener to a
second piece of code upon successful completion.
I wish I could get into more detail, but I'm not a Flex guy..
hoped that at least helped gel the idea.
-dp

Similar Messages

  • Show Progress Bar while only on Page Load.

    Hi Experts,
    I want to show progress bar every time when page loads.
    Progress bar is coming on the page. but it is not going off after page is loaded.
    Below is the code which i added for the Progress bar.
    //written on Header Text of Page
    <script type="text/javascript">
    <!--
    function html_Submit_Progress(pThis){
    $x_Show('AjaxLoading');
    window.setTimeout('$s("AjaxLoading",$x("AjaxLoading").innerHTML)', 100);
    //-->
    </script>
    //written on footer text of Page
    <style> #AjaxLoading{padding:5px;font-size:18px;width:200px;text-align:center;left:20%;top:20%;position:absolute;border:0px solid #666;}
    </style>
    <div id="AjaxLoading" style="display:none;"><br /><img src="#APP_IMAGES#progress_bar.gif" id="wait" /></div>
    //called the function Execute on Page Loads 
    html_Submit_Progress(this);Progress bar is continuously showing on the page after page is loaded.
    I want only to show only page loads.
    Please help me .
    Apex Version : Apex 4.1
    DB Version : 10g
    Regards,
    Jitendra

    Hide the loader element when the page has loaded. Put this in the javascript section
    $(document).ready(function(){ $x_Hide('AjaxLoading'); });Or put it in the page load section
    $x_Hide('AjaxLoading');Or create a dynamic action which fires on page load, select a hide action, and use a jQuery selector to target '#AjaxLoading' as an affected element.

  • Displaying progress bar while components load

    I'm going to display a JTree that's quite huge (takes time to load; I need to get the info as XML from a server, etc.)
    So, I want to display a JProgressBar while it is loading.
    My plan was to use a cardlayout, and show the panel with the progress bar until the tree was loaded and then do a .show("tree") on the main panel with the card layout.
    However, this does not seem to work. Nothing is displayed before the tree is loaded ...
    Any suggestions on best ways to do this?
    Here's my class so far:
    public class HierarchyJTree extends JPanel {
        private static Logger logger = Logger.getLogger(HierarchyJTree.class);
        private JProgressBar progress;          // keep track on progress
        private TreeMap idmap = new TreeMap(); // to map nodes created up against their id's; needed to create the tree structure when we have a parent id and want the node
        private dataAccess access = dataAccess.getInstance();
        private JTree tree;
        private CardLayout card = new CardLayout();
        private int maxProgress = 20;
         * Construct a new JTree. Collect the category information from the database.
        public HierarchyJTree() {
            this.setLayout(card);
            JPanel progressPanel = new JPanel();
            progress = new JProgressBar(0,maxProgress);
            progressPanel.add(progress);
            this.add(progressPanel, "progress");
            card.show(this,"progress");
        public void startCollectingData() {
            progress.setValue(2);
            ResultSet rs = access.sendXML("<request>\n<runQuery>getCategories</runQuery>\n</request>");
            progress.setValue(10);
            tree = new JTree(new DefaultMutableTreeNode("Categories", true));
            tree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);
            JPanel treePanel = new JPanel(new FlowLayout(FlowLayout.LEFT));
            treePanel.add(tree);
            this.add(treePanel, "tree");
            addFromResultSetToTree(rs);
            card.show(this, "tree");
         * Constructor that will use incomming ResultSet to create the tree, instead of contacting
         * the server to get a new one
         * @param resultset containing the category info from MOD_category
        public HierarchyJTree(ResultSet resultset) {
            this.setLayout(card);
            tree = new JTree(new DefaultMutableTreeNode("Categories", true));
            BasicConfigurator.configure();
            tree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);
            addFromResultSetToTree(resultset);
         * This will take a jaxb.ResultSet object containing ID, categoryName and parentID of all the
         * categories in the database, and add them as Nodes in the JTree this class represents.
         * @param r the jaxb.ResultSet object
        private void addFromResultSetToTree(ResultSet r) {
             // code to load the info into the tree here, and inc the progress
                progressValue += incValue;
                progress.setValue((int)Math.round(progressValue));
    }

    Use SwingWorker, which is not included in Swing library, but you can find it on http://java.sun.com/docs/books/tutorial/uiswing/components/example-swing/SwingWorker.java;
    see alse http://java.sun.com/docs/books/tutorial/uiswing/components/progress.html.

  • Progress bar while PDF loading on browser

    Hi,
    I have a servlet which is getting the data and rendering a PDF form and display the form into user's browser. I want to show a progress bar or a waiting image/message on the browser when a rendered PDF is loading. I found out that there is no delay in any step of the code itself but the PDF is taking time to load in a browser and this delay is increased when I apply reader extensions on rendered PDF. Is there any way to show a progress because the delay is too much.
    Regards,
    Sunaif Aziz

    I resolved this when page loads but i still have issue with a progress bar on another page displaying "before" onload...thanks.

  • Show Progress Bar while Accessing data from Server

    Hi,
    I need a Progress bar to be displayed when my application triggers database to backup, As the data would be large progress bar makes sense to display the time span.
    I need a progress bar in place to show the progress of the task,
    Can anyone suggest me how to do this? This should be shown when i backup my database from WPF.
    I have code written for server side and just need a progress bar and timer.
    Thanks,
    Shreyas M

    You could use a BackgroundWorker. There is a complete code sample available on MSDN here:
    https://msdn.microsoft.com/en-us/library/cc221403(v=vs.95).aspx. You do the long-running work, i.e. the actual backup, in the DoWork event handler.
    Note that you will need to report the progress (by calling the ReportProgress method of the BackgroundWorker) and calculate the total time it will take to complete the backup operation yourself.
    It might be easier to just display some "waiting" element and no progress bar during the time it takes for the operation to complete:
    <!-- replace this with any element like for example an Image -->
    <TextBlock x:Name="loadingElement" Visibility="Collapsed">please wait...</TextBlock>
    loadingElement.Visibility = System.Windows.Visibility.Visible;
    System.Threading.Tasks.Task.Factory.StartNew(() =>
    //call your backup method here (this code is being run on a background thread....
    .ContinueWith((t) =>
    loadingElement.Visibility = System.Windows.Visibility.Collapsed;
    }, System.Threading.CancellationToken.None, TaskContinuationOptions.None, TaskScheduler.FromCurrentSynchronizationContext());
    After all you probably don't know how long time it will take for the method to complete, right? If you want to display a ProgressBar, the backup method should report the progress somehow. If you just call a method and wait for it to complete, you have no
    idea of how long time it will take for the method to return. You will then have to estimate the actual time and then increase the value of the progress bar accordingly.
    There is no way to find out before hand exactly how long time it will take until a method returns so it is the responsibility of the (backup) method to report to the caller how long time it needs and how long time is left until it is done. Far from all API:s
    support reporting progress.
    As you see in the BackgroundWorker example on MSDN, you could call the ReportProgress once in each iteration of a loop but if there is no loop in your Backup method you better just display a busy indicator without a progress bar since you don't know anything
    about the progress anyway.
    Edit: You could of course also display a ProgressBar element with its IsIndeterminate set to True. Just replace the TextBlock and use the sample code above:
    <ProgressBar x:Name="loadingElement" IsIndeterminate="True" Height="50"/>
    Setting this property to true is useful when you don't know how long time the operation will take: 
    https://msdn.microsoft.com/en-us/library/system.windows.controls.progressbar.isindeterminate(v=vs.110).aspx
    Hope that helps.
    Please remember to mark helpful posts as answer to close your threads and then start a new thread if you have a new question. Please don't ask several questions in the same thread.

  • Show progress bar while executing scp command in linux

    I am being trying to execute scp command throug java frames, I want to know is there any way to show progress when i am copying a file to another system.
    The scp command shows the progress in command prompt can i implement that on the jprogressbar.
    thanx in advance.

    I am being trying to execute scp command throug java frames, I want to know is there any way to show progress when i am copying a file to another system.
    The scp command shows the progress in command prompt can i implement that on the jprogressbar.
    thanx in advance.

  • Show progress bar before loading the applet or application

    hi ,
    My application size is large and take some time to load . Now i want that to show progress bar . how can i do this .Please Help me
    sorry for my english.
    Thanks

    Do everything in a seperate thread. Create a progress bar in the main thread, then create a new thread for initializing your app. Once the init is done, hide the progress bar and make your app visible.

  • How to show progress bar in miniplayer?

    How to show progress bar in miniplayer? I play a lot of music podcasts and it would be very helpful if anyone could help me bring that feature back.

    i answered here:
    http://forum.java.sun.com/thread.jspa?messageID=9739423&#9739423

  • Displaying an Indeterminate Progress Bar While a DB2 Stored Proceedure Runs

    How do I display a dialog with an indeterminate progress bar while a DB2 query runs? Could anyone point me to an example or some strong docs?
    I learned Java about six months ago, so I'm relatively new to the language. Through searching and documentation, I've been able to find all the examples and answers I've needed so far. Now I've run into an issue I can't find anywhere. It seems like the most basic thing in the world. I have a DB2 stored procedure that takes about 5 minutes to run. While it's running, I want to display a simple dialog with a progress bar going back and forth (no buttons, no user interaction).
    I'm using Eclipse 3.3.1.1 as my IDE, and running the application from a JAR file. I have Java 1.6.0.30 installed. The DB2 query is running in response to a user clicking a button on the form (an ActionEvent). All of my forms are using Swing (JFrame, JDialog, etc.).
    The crux of my problem seems to be that I can bring up a dialog (which should contain the progress bar), but I can't get it to paint. All I get is a window that's the right size/location, but contains an after-image of what was behind it. I can't even get a dialog to display with a "Please Wait" label while the DB2 procedure runs.
    I tried separating both the DB2 stored procedure and the progress dialog into separate threads. I tried yielding in the DB2 thread to give the progress dialog a chance to update. I tried using invokeAndWait, but I got the following error:
    Exception in thread "AWT-EventQueue-0" java.lang.Error: Cannot call invokeAndWait from the event dispatcher thread
    It seems like I'm doing something wrong in my use of Theads, but I can't for the life of me figure out what it is. If anyone could help out a bit of a Java newbie, I would be extremely grateful.

    Demo:
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class ProgressBarExample2 {
        private JProgressBar bar = new JProgressBar(0,99);
        private JButton button = new JButton("Lengthy operation");
        private ActionListener al = new ActionListener(){
           public void actionPerformed(ActionEvent evt) {
                button.setEnabled(false);
                bar.setIndeterminate(true);
                new Worker().execute();
        private class Worker extends SwingWorker<Boolean, Boolean>{
            protected Boolean doInBackground() {
                try {
                    Thread.sleep(10000); //10 secs
                } catch (InterruptedException e) {
                return Boolean.TRUE;
            protected void done() {
                button.setEnabled(true);
                bar.setIndeterminate(false);
        public static void main(String[] args) {
            EventQueue.invokeLater(new Runnable() {
                public void run() {
                    new ProgressBarExample2();
        ProgressBarExample2() {
            button.addActionListener(al);
            JPanel cp = new JPanel();
            cp.add(button);
            cp.add(bar);
            JFrame f = new JFrame("ProgressBarExample2");
            f.setContentPane(cp);
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.pack();
            f.setLocationRelativeTo(null);
            f.setVisible(true);
    }

  • HT4718 I can't reach recovery system when I reboot- I press 'command' and 'r' quickly, but nothing happens, the progress bar begins to load... Any thoughts?

    I can't reach recovery system when I reboot- I press 'command' and 'r' quickly, but nothing happens, the progress bar begins to load... Any thoughts? It gets about halfway through loading and then stops, no mouse, no nothing. I think I'll be able to move past it if I can reach the Recovery options.
    Thanks!

    If you are really sure that it's impossible to click in Recovery mode, then something is wrong with the machine.
    Make a "Genius" appointment at an Apple Store, or go to another authorized service provider.
    Back up all data on the internal drive(s) before you hand over your computer to anyone. There are ways to back up a computer that isn't fully functional — ask if you need guidance.
    If privacy is a concern, erase the data partition(s) with the option to write zeros* (do this only if you have at least two complete, independent backups, and you know how to restore to an empty drive from any of them.) Don’t erase the recovery partition, if present.
    Keeping your confidential data secure during hardware repair
    Apple also recommends that you deauthorize a device in the iTunes Store before having it serviced.
    *An SSD doesn't need to be zeroed.

  • PROGRESS BAR while loading report

    Hi Fiends,
    I have a classic report w/ a link and this link open a other page and this page is a report with a report model ( CSV ).. and this load is too slow and i wanna include a progress bar like this site [link]http://apex.oracle.com/pls/otn/f?p=987654321:26[link] and this progress bar will be show while the report is loading ...
    Anybody knows how to do this ?
    Tks
    Zander

    Hi,
    Have you seen :
    [url http://apex.oracle.com/pls/otn/f?p=65560:2:0::NO] Loading Icon plugin
    [url http://www.apex-plugin.com/oracle-apex-plugins/dynamic-action-plugin/loading-icon_81.html]Click here to see the features and download
    And I think that it is good to check [url http://docs.oracle.com/cd/E23903_01/doc/doc.41/e21676/apex_plsql_job.htm#AEAPI1203]APEX_PLSQL_JOB
    Regards,
    Fateh
    Edited by: Fateh on Sep 22, 2012 1:26 AM

  • PROGRESS BAR WHILE LOADING A PAGE

    All,
    iam using below code and its working good with page submit button but i need it for a page load i.e when a page loads show the progress bar(page which take a while to load) so i can call it like onload. Anybody who has done this pls i appreciate if you could help...
    function html_Submit_Progress(pThis){ 
    $x_Show('AjaxLoading');
    window.setTimeout('$s("AjaxLoading",$x("AjaxLoading").innerHTML)', 900);
    doSubmit('APPLY_CHANGES');
    function submit_HideAll(pThis){ 
    $x_Hide('wwvFlowForm');
    doSubmit('APPLY_CHANGES');
    function submit_ButtonRegion(pThis){ 
    $x_Hide('button_region');
    doSubmit('APPLY_CHANGES');
    using apex 4.1 and my page here i need it is a popup.
    thanks

    You can fix that in your page template by putting something like this just before the BODY tag in the Header region:
    <div id="loading"
      style="display: block;
             position: fixed;
             top: 0px;
             left: 0;
             z-index: 1999;
             width: 100%;
             height: 100%;
             background-color: #fff;
             text-align: center;">
    <div style="position: relative;
                top: 130px;">
    Wait..loading..
    </div>
    <img src="#IMAGE_PREFIX#themes/theme_200/images/loading.gif" height="32" width="32"
       style="position: relative;
              top: 150px;"/>
    </div>and putting something like this just after the closing BODY tag in the Footer region:
    <script>
    $(document).ready(function(){
      $('#loading').hide();
    </script>

  • Progress bar while loading table

    Hi, please could anyone help me to how to create progress bar when i am loading large number of data using bean. data would be unknown so how do i show the status...plz help..
    thanks

    This should help
    http://java.sun.com/docs/books/tutorial/uiswing/components/progress.html

  • IMac first shows progress bar on startup and then won't start up at all!

    Hi,
    My iMac's somewhat ill I'm afraid. When I power it up, the Apple gong goes and I see the grey Apple logo appear. Few seconds later an progress bar shows up and it doesn't fill, in a minute it'll just disappears and the spinning thing under the logo appears. I've been waiting for over an hour and still nothing happened. I've tried force-powering it off and boot it up again, but still the same results, this is very very very annoying, especially since I don't know what to do at all about this expect for a complete clean install, but that'll be the last option I want, because all my photo's are on it, etc.
    I've installed, an complete clean install, of Snow Leopard a month or two ago, and yesterday I powered the computer off the regular way.
    Thanks a lot in advance you guys!
    EDIT
    Another weird thing going on: I have my hard drive configured in two partition, one for Windows (sorry, needed to run AutoCad) and one for Mac OS. Now when I start up with the option button I get to see the two partitions and their names. My Mac drive now has got a different name, it's the same name, but with a " 1" behind it.
    When I select the partition on Windows Vista, it now shows these disturbing folders:
    http://i49.tinypic.com/2rxjpd3.jpg
    Message was edited by: RobinZ.

    HI and Welcome to Apple Discussions...
    Boot from your install disc and run Disk Utiity to see if there are errors on the startup disk that need repairing.
    Insert your install disk and Restart, holding down the "C" key until grey Apple appears.
    Go to Installer menu and launch Disk Utility.
    Select your HDD (manufacturer ID) in the left panel.
    Select First Aid in the Main panel.
    *(Check S.M.A.R.T Status of HDD at the bottom of right panel. It should say: Verified)*
    Click Repair Disk on the bottom right.
    If DU reports disk does not need repairs quit DU and restart.
    If DU reports errors Repair again and again until DU reports disk is repaired.
    When you are finished with DU, from the Menu Bar, select Utilities/Startup Manager.
    Select your start up disk and click Restart
    While you have the Disk Utility window open, look at the bottom of the window. Where you see Capacity and Available. *Make sure there is always 10% to 15% free disk space*
    If you cannot boot from your install disc, try booting in Safe Mode
    What is Safe Mode
    *" because all my photo's are on it, etc."*
    If you can get the iMac to boot normally I suggest you back up those photos and any other important data to an external source ASAP in case there's a problem.
    No idea why you are seeing those folders in Windows. Boot from your install disc and see what's going on.
    Carolyn

  • Creating a progress bar while querying a report in Visual Studio

    I have created a Visual Studio 2013 program that runs reports from a SQL server.  I want a progress bar to show up in my VS program while it is querying so my user doesn't think that it is frozen while running larger queries.  How can I do this.
     Step by step is better since I am new to programming.
    Gracies 
    Much Love 

    Hi flextera,
    Based on your description, I’m afraid that it is not the correct forum for this issue, since this forum is to discuss:
    Visual Studio WPF/SL Designer, Visual Studio Guidance Automation Toolkit, Developer Documentation and Help System, and Visual Studio Editor.
    To make this issue clearly, would you mind letting us know more information about this issue? Which language are you using? Which kind of app are you developing? You said that it is related to the report in SQL Server, is it the SSRS issue or the specific
    windows app like the WinForms app?
    Please share me more information, I will help you find the correct forum for this issues.
    If there's any concern, please feel free to let me know.
    Best Regards,
    Jack
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

Maybe you are looking for

  • How to use multiple values in an IF condition in RTF

    Hi, I have a scenario as mentioned below. IF column value in ('A','B') display C; end if IF column value not in ('A','B') display D; end if My query is how to provide multiple values in an IF condition.? Thanks, Anand

  • How to restrict the department to not user other departments' equipment?

    Dear SAPIENTS, How to restrict the department to not user other departments' equipment? If suppose any one creating order for equipment having different authorization group then system should not allow me to do this. Regards, Kaushal Rai

  • Popup window not populated on SAVE event

    Hi All, I am enhancing standard AIC_INCIDENT_H component on EH_ONSAVE event, requirement is  to display ComponentUsage "CUGSSurvey" , InterfaceView "SurveyWindow as Popup window , but there is a blank popup appeared On SAVE event i write the followin

  • To get the DB table name used by CRM_UI_FRAME to store data.

    Hi All, Can anyone plz tell me how to get the DB table name used by the CRM_UI_FRAME to store data .Actually its a Ztable. Or else where to put the debug poin in order to get that. Thanx Abhishek

  • Can I buy an extra 16 GB of RAM for my iMac?

    My computer specs are as follows: iMac 21.5-inch, Mid 2011 Processor: 2.5 GHz Intel Core i5 Memory: 4 GB 1333 MHz DDR3 Graphics: AMD Radeon HD 6750M 512 MB Running OS X 10.9.2 Can I buy two 8 GB sticks of RAM, adding an extra 16 GB to my iMac? I real