Progress Bar doesnt show

why doesnt progress bar show on ie/ns?....Thank you all.
<cfif isdefined('form.Process') and form.process eq "Process" and isdefined('Form.rosterfile') and form.rosterfile neq "">
<cfset CurrDir = GetDirectoryFromPath(GetTemplatePath())>
  <cfset StorageDir = GetDirectoryFromPath(GetTemplatePath()) & "Storage\">
      <div id="display_while_running">
         <table align="center" border="0" cellpadding="0" cellspacing="0" style="border:solid 1px green; background : #backgroundcolor1#; width:600px;padding:5px; text-align:center;">
          <tr>
            <td >
              <b>Please wait while it is processing...</b>
            </td>
          </tr>
          <tr>
            <td>
             <img src="../imgs/progressbar2.gif" width="250" height="20">
            </td>
          </tr>
        </table>
      </div>
    <!---CFOUTPUT>#RepeatString(" ",300)#</CFOUTPUT--->
      <!---cfflush--->
      <cffile action="upload"
      destination="#StorageDir#"
      nameConflict="overwrite"
      fileField="Form.rosterfile">
      <cfset strFilePath ="#StorageDir##cffile.serverFile#">
      <cfset strFile ="#cffile.serverFile#">
      <cfquery datasource="#application.Orc#" name="GetFileName">  
        Select FILE_NAME from ops$rms.HR_File
        where
        lower(file_name) = lower('#strFile#')
     </cfquery>
    <cfif GetFileName.recordcount neq 0>
      <cfset msg = "This file has been already uploaded. Please upload a different one.">
    <cfelse>
        <cfflush interval="10">
        <cfset CurrFilePath ="#CurrDir##cffile.serverFile#">
        <cffile action = "copy" source="#strFilePath#" destination="#CurrDir#">
        <cffile action="rename" source="#CurrFilePath#" destination="#CurrDir#HrXls.xls">
        <cflock name="xlsloader" timeout="300" type="exclusive">
              <cfset command = "java RMSHRFileReader C:\Inetpub\wwwroot\RMS\hr_loader\HrXls.xls">
              <cfset syscmd = createObject("java","au.com.webcode.util.SystemCommand").init()>
              <cfset result = syscmd.execute(command,"300000")> <!---5 mins, must be a string--->
              <cfif result.getExitValue() neq 0>
               <cfset msg = "The uploading process has been partially completed.">
       </cfif>
        </cflock>
        <cfquery datasource="#application.Orc#" name="InsFileName">
          insert into ops$rms.HR_File(file_name, updated_on, updated_by)
          values('#strFile#',SYSDATE,'#session.username#')
        </cfquery>
        <cfset stdout = 1> 
        <cffile action = "delete" file="#CurrDir#HrXls.xls">
    </cfif>
  <script language="Javascript">
      document.getElementById('display_while_running').style.display='none';
    </script>
</cfif>

Because ColdFusion code starts executing after the contents of the
file to be uploaded is received by the server. In other words when
you're trying to show the progress bar there's no need for a progress
bar because the upload is at 100%.
Mack

Similar Messages

  • How can I add a Progress bar to show the "render to JPG" progress?

    Hi everyone, I have a button which renders my component to
    JPG.
    How can I attach a progress bar to show the progress of the
    rendering?
    <mx:Button label="render" click="renderasJPEG ()"/>
    public function renderasJPEG( ):void
    convertToImage( component001, new JPEGEncoder( 100));
    private function convertToImage( object:IUICompon ent,
    encoder:IImageEncod er):void
    var base64string: String = ImageSnapshot. encodeImageAsBas
    e64(
    ImageSnapshot. captureImage( object, 72, encoder));
    var variables:URLVariab les = new URLVariables( );
    variables.encoded = base64string;
    variables.type = "jpeg";
    var request:URLRequest = new URLRequest(" script_saveasima
    ge.php");
    request.method = "POST";
    request.data = variables;
    navigateToURL( request, "_blank");
    Thanks in advance.

    Hi,
    I would have thrown a prompt to the user in the renderasJpeg
    function and removed it in last line of convertToImage function.
    Isn't this what you want?
    Hope this helps.

  • My tablet started this new update about 4 hours ago, it said it would take 30 minutes...... in the progress bar it shows its downloading but its never changed from 0%. how pr what do i do? am i supposed to let it run all night?

    My tablet has been downloading the new update for over 4 hours now, though the progress bar still shows 0%!!! What do I do???

    Reply to myself...... Thank you, thank you, thank you chersgroupie!!!!  Turning the WiFi off worked and the update finished in about 5 minutes on 4G!!! Note: at the start of update my instructions  were: plug in if not full battery and use WiFi!!!!!  Hard to explain to your 3 year old why they can't have their tablet and you've done what you were instructed to do!!! I pay too much a month for this kind of preventable aggravation!!!

  • I start internet sharing through air port but the arrow in the desktop tool bar doesnt show up.  doesnt appear

    I start internet sharing through air port but the arrow in the desktop tool bar doesnt show up. 

    i figured it out through another persons post thanks anyway.

  • FM10 Progress-bar indicator shows no progress

    I'm using FM10 (v10.0.2.419) on Windows 7 OS.
    When I print to postscript, the pink ribbon that used to show the progess does not display any longer,
    and the percentages indicator remains at 0%.
    Any ideas? My colleague right next to me is using the same SW and HW and does not have this problem.
    Thanks in advance for any ideas....

    Do you see the page numbers increasing below the progress bar (thermometer in FM's parlance)? Does the job "print" to completion? What device are you printing to?
    You could check your maker.ini file to see if the colour definition has been changed to be a background grey. The default setting should be:
    [Thermometers]
    ;-------------------- Thermometer Color Definitions -----------------------
    ThermoDoneColor=255, 0, 255
    ThermoRemainingColor=192, 192, 192
    There are two versions of the maker.ini file. The global one in the %FMhome% folder and the user-specific one in the \Users\<username>\AppData\Roaming\Adobe\FrameMaker\11 folder.

  • Help With Zen Vision:M 30G, lost alot of music, "rebuilding" progress bar doesnt fin

    I purchased my Zen Vision:M 30GB player about 5 months ago and its been great untill today I turned it on and it froze, so i hit the reset button.
    Heres the thingI reset it and that "Rebuilding" progress bar poped up like it has in the past when i hit reset?But this time the progress bar only got about? /6th of the way full, before the unit returned to its normal menu, and i went to look at my music and about 90% of it is gone! Ive done a restart in the past and the rebuilding progress bar would have to fill up all the way before it would go to the normal menu and i had no problems with it then, just today it started doing the thing where it would only go /6th the way. Heres the weird stuff,I went to look at the system information to look how much memory was left and based on the numbers, my 90% of missing music should still be on there somewhere. I tried connecting it to my computer and all the sudden now my computer decides to recognize it but The Creative Media Explorer will say its not connected, that is a first for me too?I tried doing that system recovery thing, where i did the scan disk but that did not help at all. Everytime i try to re-boot or re-start it does that thing where the "Rebuilding" progress bar only goes /6th of the way before it goes back to the normal menu, i think that has somthing to do with it. Any help would be GREATLY appreciated?Message Edited by Lowalkoroc on 03-7-20070:20 PM
    Message Edited by Lowalkoroc on 03-7-20070:20 PM

    I was just about to post a topic about this. I had the same problem and after numerous efforts I decided to follow the "Format (All)" instructions [url="http://forums.creative.com/creativelabs/board/message?board.id=dap&message.id=5530#M5530">here[/url]. After a reformat, a reboot, and a reload of all my songs everything is working again. Thank the Lord and the Creative forums.

  • Progress bar that shows the progress of measurements

    how to create a progress bar which gets initiated once a button is pressed and fills up with every second elapsed? Mainly i want to create the same progress bar as it appears in windows or winrar kinda things where the expected time and elapsed time is shown.
    Solved!
    Go to Solution.

    Hi Naina,
    - I would use a while loop when you don't know how long the progress will run...
    - I would use a wait function in the loop set to wait for 1000ms to get an update each second...
    - you need to now from your process the progress and the elapsed time (as said before) and additionally the state (running or not running). That's all you need to know to calc the progress bar...
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • DFU and tried to recover but progress bar never showed up

      I recently tried to restore my extremely loaded and bugging iPhone 3Gs into a default state via DFU mode. I used a fw file with my 6.1.2 shsh stitched into it so I may recover to 6.1.2. Things went smooth when I put my phone into pwned DFU and choose the fw in iTunes. All that is after iTunes verified that the fw can be installed and prepair to do the recovery by booting into the "bar mode" (Don't ask, just the screen that shows the firmware install progress.) The phone will just try to boot itself up as normal and I recieve a random error like err. 1604, 1643 ect. I am doing it on a Mac but swaping to a windows doesn't help.

    Hello Cyrus,
    not "perhaps" but "sure": read the forums conditions....
    I am sorry, no way,

  • Would someoen show me example of progress bar?

    i am confused by Sun's explanation... i just wanna make a simple progress bar thats sorta like a timer.... you get a number, say 100, and the progress bar will show the progress of a thread counting to that number in seconds...

    ugly Q&D,
    import java.awt.*;
    import javax.swing.*;
    public class ProgressBar
          private static JFrame f = null;
          public PPanel p = null;
          private int min = 0;
          private int max = 100;
          private int now = 0;
          private int count = -1;
          private long sleepTime = 500;
          private Thread clockThread = null;
          private volatile boolean noStopRequested = true;
          private Runnable r = null;
          private class PPanel extends JPanel
             public void repaint()
                Graphics g = getGraphics();
                if( null == g ) return;
                g.setColor( Color.cyan );
                double d = ( (double) now / (double) max ) * getWidth();
                g.fillRect( 0, 0, (int) d, getHeight() );
          public ProgressBar()
          public void setNow( int i )
          this.now = i;
          p.repaint();
          private void initialize()
          p = new PPanel();
          p.setPreferredSize( new Dimension( 100, 10 ) );
          try
             r = new Runnable()
                   public void run()
                   try
                      runWork();
                   catch( Exception e )
                      e.printStackTrace();
                      //error
          catch( Exception  e )
             e.printStackTrace();
          clockThread = new Thread( r );
          clockThread.start();
          public static void main( String[] args )
          ProgressBar pg = new ProgressBar();
          pg.initialize();
          f = new JFrame();
          JPanel pp = (JPanel) f.getContentPane();
          pp.add( pg.p );//bad
          f.pack();
          f.show();
          private void runWork() {
          while( noStopRequested ) {
             try {
                this.process();
                Thread.sleep( sleepTime );
             } catch( Exception e ) {
                //error
                e.printStackTrace();
          private void process()
          setNow( count++ );
          if( count == max )
             f.dispose();
          public void stopRequest()
          noStopRequested = false;
          clockThread.interrupt();
          public void startRequest()
          noStopRequested = true;
          clockThread.interrupt();
    }

  • Progress bar  in text environemnt..

    I am trying to run the following in order to create a progress bar and show some activity during run time of my program.
    The problem lies i believe in maven as i running JUnit tests and in order to work maven is used.
    If the JUnit is runned inside Eclipse then it works fine , but trying to run it through my terminal running mvn test doesnt.
    There is nothing i can change in this, it was here when i come and it works perfectly for eveyone else.
    The problem i am facing is that out.print will not be executed until a println is.
    I am wondering if someone that has used maven before has any experience in how to by bypass this problem and add my progress bar in my system.
    source code ....
               * Creating of the activity bar diagram. ** Maven fault doesnt allow print **
               * @param text
               * @param backspaceSize
               * @return int
               *                The length of the string that was displayed, in order to be removed when called again.
              public static int activity(String text, int backspaceSize) {
                   // Setting the printstream
                   PrintStream pw = new PrintStream(System.out, false);
                   // in order to remove the previous text it will take the length and remove accordingly.
                    try {
                         for ( int i=0; i < backspaceSize ; i ++ ) {
                              pw.print("\b");
                        //seting the text to display
                        text = " " + getPosition() + " - " + text;           // append an expty space to distinquish from the whole one.
                        pw.print(text);
                        pw.flush();
                     } catch (Exception ex) {ex.printStackTrace();}
                 return text.length();
                   * Will return the value of the array to create an activity diagram
                   * @return Array value
                 private  static String getPosition (){
                    i++;
                   String array[] = {"\\","-","/","|"};
                   if ( i == 4) { i = 0 ; }
                   return array;

    If it works for everyone else, are you using the same version of maven?

  • Creating progress bar in oracle forms 6i

    Hii
    I have a push-button (pb_submit)
    when when_button_pressed trigger fired...I have a database main procedure to be called.
    inside that procedure i am calling 25 procedures.
    and all 25 Procedures will be executed sequencially.
    I want to use a Progress bar...
    so that user will get to know hw much % completed
    if main procedure(total 25 procedures inside) is completed successfully then progress bar should show 100%
    like wise if 1 procedure completed then 4 %
                 if 2 procedure completed then 8 %
    total 25 procedure completed then 100%
    how to implement this logic.
    and if in between 1 procedure failed then progress bar should stop at that incident.
    and it should start from dat instant only if again that failed procedure run successfully.
    should i post my codes here.ok...here is the codes written in the button(when_button_pressed trigger)
    DECLARE
      l_Last_Record      NUMBER  := 0  ;
      l_Prg_Process_Id    NUMBER     ;
      l_Prg_Process_Id_1  NUMBER     ;
      l_Prg_Id       VARCHAR2(15)  ;
      l_Alert_Result    VARCHAR2(1)   ;
      l_Validation_Msg   VARCHAR2(500) ;
      l_Path        VARCHAR2(240) ;
      File_Name       VARCHAR2(250) ;
      l_file_exists     BOOLEAN       ;
      l_file_len        NUMBER     ;
      l_blocksize       BINARY_INTEGER;
      o_Status       VARCHAR2(1)  ;
      o_User_Selection_Ca1 VARCHAR2(1)  ;
      o_User_Selection_Ca2 VARCHAR2(1)  ;
      o_User_Selection_Ca3 VARCHAR2(1)  ;
      CURSOR C_Validation IS
      SELECT Cpv_Validation_Type     ,
             Cpv_Validation_Input    ,
             Cpv_Validation_Action  ,
             Cpv_Validation_Active_Flag
      FROM   Config_Process_Validation
      WHERE  Cpv_Program_Id = l_Prg_Id
      AND   Nvl(Cpv_Validation_Active_Flag, 'N') = 'Y'
      ORDER BY Cpv_Validation_Sequence;
    BEGIN
    SELECT RV_HIGH_VALUE
    INTO   l_Path
    FROM   CG_REF_CODES
    WHERE  Rv_Domain    = 'DERV_DATA_FILES'
    AND   Rv_Low_Value = 'DRV_FILES';
    Go_Block('Process');
      Last_Record;
      l_Last_Record := :System.Cursor_Record; 
      First_Record;
      FOR i IN 1 .. l_Last_Record
      LOOP
      Go_Record(i);
      l_Prg_Id := :Prog_Id;
      IF NVL(:Process.Cb_Select,'N') = 'Y' THEN
       :Query.Current_Status := 'Current Process: ' || :Process.Prog_Desc;
       Synchronize;
       --Validate if program is already in running mode or already completed
       SELECT NVL(MAX(DECODE(Prg_Status, 'R', 999999999, 'C', Prg_Process_Id)), 0)
       INTO   l_Prg_Process_Id
       FROM   Program_Status,
           Parameter_Master
       WHERE  Prg_Dt      = Pam_Curr_Dt
       AND    Prg_Cmp_Id  = l_Prg_Id
       AND    Prg_Exm_Id  IN ('ALL', :Query.Exchange)
       AND    Prg_Status  IN ('R', 'C');
       IF l_Prg_Process_Id = 999999999 THEN
         P_Show_Alert(l_Prg_Id||' Process is already running.','A',l_Alert_Result);
        --RAISE Form_Trigger_Failure;
       ELSIF l_Prg_Process_Id > 0 AND :Execution_Flag <> 'M' THEN
        P_Show_Alert(l_Prg_Id||' Process already run. It can not run twice. ','A',l_Alert_Result);
        RAISE Form_Trigger_Failure;
       END IF;
       --Validate mandataory process, process specific validation and message
       FOR i IN C_Validation
       LOOP
        IF i.Cpv_Validation_Type = 'MANDATORY' AND i.Cpv_Validation_Active_Flag = 'Y' THEN
           SELECT Count(1)
           INTO   l_Prg_Process_Id_1
           FROM   Program_Status,
               Parameter_Master
         WHERE  Prg_Dt      = Pam_Curr_Dt
         AND    Prg_Cmp_Id  = i.Cpv_Validation_Input
         AND    Prg_Exm_Id  IN ('ALL', :Query.Exchange)
         AND    Prg_Status  = 'C'
         AND    Prg_Process_Id IN (SELECT MAX(Prg_Process_Id)
                      FROM   Program_Status,
                          Parameter_Master
                      WHERE  Prg_Dt      = Pam_Curr_Dt
                      AND    Prg_Cmp_Id  = i.Cpv_Validation_Input
                      AND    Prg_Exm_Id  IN ('ALL',:Query.Exchange)
                      AND    Prg_Status  = 'C');
         IF l_Prg_Process_Id_1 = 0 THEN
          P_Show_Alert(i.Cpv_Validation_Input||' Mandatory Process NOT completed successfully.','A',l_Alert_Result);
          RAISE Form_Trigger_Failure;
         END IF;
        ELSIF i.Cpv_Validation_Type = 'MESSAGE' THEN
         P_Show_Alert(i.Cpv_Validation_Input, i.Cpv_Validation_Action, l_Alert_Result);
         IF l_Alert_Result = 'N' THEN
          RAISE Form_Trigger_Failure;
         END IF;
        ELSE   
         --- OTHER PROCESS SPECIFIC VALIDATION
         l_Validation_Msg := Null;
         Pkg_Process_Automation.P_Pre_Process_Validation(l_Prg_Id,
                                 :Query.Exchange,
                                 :Query.Segment,
                                 i.Cpv_Validation_Type,
                                 l_Validation_Msg);
         IF l_Validation_Msg IS NOT NULL THEN
          P_Show_Alert(l_Validation_Msg,i.Cpv_Validation_Action,l_Alert_Result);
          IF l_Alert_Result = 'N' THEN
           RAISE Form_Trigger_Failure;
          END IF;
         END IF;  
        END IF; 
       END LOOP;
       --Validating whether file exists or not
       IF :Process.File_Input_Format IS NOT NULL THEN
        Pkg_Process_Automation.P_Gen_File_Name(:Process.File_Input_Format,
                            :Query.Exchange,
                            :Query.Segment,
                            File_Name);
        Utl_File.FGetAttr(
         location    => l_Path,
         filename    => File_Name,
         fexists     => l_file_exists,
         file_length => l_file_len,
         block_size  => l_blocksize);
        IF NOT l_File_Exists THEN
         --MESSAGE('The file does not exist.');
         P_Show_Alert('The file does not exist.','A',l_Alert_Result);
         RAISE Form_Trigger_Failure;
        END IF;
       END IF;
       Set_Application_Property(Cursor_Style, 'BUSY');
       SET_ITEM_INSTANCE_PROPERTY('Process.Status', CURRENT_RECORD, VISUAL_ATTRIBUTE, 'VA_YELLOW');
       :Process.Status := 'R';
       Synchronize;
       IF l_Prg_Id = 'DTMBCORP' THEN
        P_Show_Alert('Do you want to do Final Settlement Corporate Action ?(Y/N)','I',l_Alert_Result);
        o_User_Selection_Ca1 := l_Alert_Result;
        P_Show_Alert('Enable Round-To-Tick ? (Y/N)','I',l_Alert_Result);
        o_User_Selection_Ca2 := l_Alert_Result;
        --P_Show_Alert('Do you want to Rollback ? (Y/N)','I',l_Alert_Result);
        --o_User_Selection_Ca3 := l_Alert_Result;
       END IF;
       ----   Calling of Main Procedure
       Pkg_Process_Automation.P_Run_Process(l_Prg_Id,
                          :Query.Exchange,
                          :Query.Segment,
                          :Query.Entity_Id,
                          File_Name,
                          o_User_Selection_Ca1,
                          o_User_Selection_Ca2,
                          o_User_Selection_Ca3,
                          o_Status);
       IF l_Prg_Id = 'DTMBCORP' THEN
        P_Show_Alert('Do you want to Rollback (Y/N)','I',l_Alert_Result);
        o_User_Selection_Ca3 := l_Alert_Result;
        Pkg_Process_Automation.P_Run_Process(l_Prg_Id,
                            :Query.Exchange,
                            :Query.Segment,
                            :Query.Entity_Id,
                            File_Name,
                            o_User_Selection_Ca1,
                            o_User_Selection_Ca2,
                            o_User_Selection_Ca3,
                            o_Status);
       END IF;                 
       Set_Application_Property(Cursor_Style, 'DEFAULT');                  
       Message(o_Status);
       Message(o_Status);
       IF o_Status = 'Y' THEN
        :Process.Status := 'C';
        SET_ITEM_INSTANCE_PROPERTY('Process.Status', CURRENT_RECORD, VISUAL_ATTRIBUTE, 'VA_GREEN');
       ELSE
        :Process.Status := 'E';
        SET_ITEM_INSTANCE_PROPERTY('Process.Status', CURRENT_RECORD, VISUAL_ATTRIBUTE, 'VA_RED');
       END IF;
       SELECT Prg_Log_File
       INTO   :Process.Log_File
       FROM   Program_Status ,
              Parameter_Master
         WHERE  Prg_cmp_id = l_Prg_Id
         AND    Prg_dt     = Pam_Curr_Dt
          AND   (Prg_Cmp_Id,Prg_Strt_Time)  IN (SELECT   Prg_Cmp_Id,max(Prg_Strt_Time) 
                                   FROM   Program_Status b,
                                                        Parameter_Master
                                                 WHERE  Prg_Cmp_Id =  l_Prg_Id
                                   AND    Prg_Dt     =  Pam_Curr_Dt
                                                  GROUP BY Prg_Cmp_Id);
       Synchronize;
       Set_Application_Property(Cursor_Style, 'DEFAULT');   
      END IF;
    END LOOP;
    :Query.Current_Status := '';
    Synchronize;
    EXCEPTION
      WHEN OTHERS THEN
      :Query.Current_Status := 'Error found';
      Set_Application_Property(Cursor_Style, 'DEFAULT');
      MESSAGE(sqlerrm );
      --MESSAGE(sqlerrm );
      Synchronize;
    END;
    inside p_run_process there are other 25 database procedures.
    help me !!!

    Create a procedure as like,
    PROCEDURE show_progress(x number) IS
    y number;
    BEGIN
      set_item_property('PART_DISP',VISIBLE,PROPERTY_TRUE);
      set_item_property('PART_DISP',WIDTH,x);
      set_item_property('PART_DISP',VISIBLE,PROPERTY_TRUE);
    END;
    PART_DISP is a display_item.
    After completion of each procedures call the above procedure like,
    cntr:=cntr+1;
    show_progress(round(cntr/25*287,0));
    synchronize;
    where cntr is a counter it will be incremented 1 to 25, the constant value 287 is the maximum width of PART_DISP (you can change for your need).
    The local variable cntr's initial value is 0 and maximum value is 25.    
    cntr                   part_disp          % of progress
    1
    11.48
    4
    2
    22.96
    8
    3
    34.44
    12
    4
    45.92
    16
    5
    57.4
    20
    6
    68.88
    24
    7
    80.36
    28
    8
    91.84
    32
    9
    103.32
    36
    11
    126.28
    44
    12
    137.76
    48
    13
    149.24
    52
    14
    160.72
    56
    15
    172.2
    60
    16
    183.68
    64
    17
    195.16
    68
    18
    206.64
    72
    19
    218.12
    76
    20
    229.6
    80
    21
    241.08
    84
    22
    252.56
    88
    23
    264.04
    92
    24
    275.52
    96
    25
    287
    100
    Hope this will help.

  • Progress bar for report?

    Hi there,
    Does anyone have any advice on how to display a progress bar while a report is running (PDF report, web, using Reports 6, OAS)? We have the report output pop up in a new dialog browser window. The window pops up, but depending on the report, sometimes it takes a minute or so before the report output is actually displayed in the window. The users are requesting a progress bar to show them that it's working and how far they are from seeing the output.
    Any ideas? Any built-in functionality? Should I bring Forms into the mix?
    Thanks in advance
    Dave

    user-Rachna wrote:
    I created a dynamic action on 'Before page submit' and showed an alert to see if it works or not. But it doesn't work for my report as the report gets refreshed without submitting the page.
    Here is exactly what I have:
    http://apex.oracle.com/pls/apex/f?p=54687:38:109840028367746
    Thanks.
    It would seem to be an obvious step to create additional dynamic actions on the Before/After Refresh events for the report region to show/hide the plug-in loading frame.

  • Is there a way to use a progress bar with Xerces XML Parser?

    My program is parsing very long XML files that take several minutes to parse. I am using Xerces as the parser. I would like to use a progress bar to show the progress, but I haven't found any way to get Xerces to give progress updates. Is this possible?

    Use teh SAX parser and listen to SAX events. Example:
    import java.io.*;
    import java.util.*;
    //jaxp-api.jar:
    import javax.xml.parsers.SAXParser;
    import javax.xml.parsers.SAXParserFactory;
    //sax.jar:
    import org.xml.sax.Attributes;
    import org.xml.sax.InputSource;
    import org.xml.sax.XMLReader;
    import org.xml.sax.helpers.DefaultHandler;
    import mine.IOUtils;
    * Handler to read content from (large) XML sources and send events to registered XMLListeners. Use this class to read
    * big (multiple megabytes) XML files via SAX and listen to XML events to process XML elements.
    * For small (less than a megabyte) XML files, it's more convenient to use the DOM API
    * to read the XML into a DOM document and perform XPath commands. DOM is easier to handle but has
    * the drawback that the complete XML content is stored in one big DOM document object in memory.
    public final class XMLHandler extends DefaultHandler {
        /** (Reusable) XMLReader to parse an XML document. */
        private XMLReader xmlReader = null;
        /** Registered XMLEventListeners. */
        private List<XMLListener> listeners = new ArrayList<XMLListener>();
        /** Value of current element. */
        private StringBuilder elementValue = null;
        /** Stack of current element and all of its parent elements. */
        private Stack<String> elementStack = new Stack<String>();
         * Constructor.
         * @throws Exception
        public XMLHandler() throws Exception {
            super();
            // Create a JAXP SAXParserFactory and configure it
            final SAXParserFactory spf = SAXParserFactory.newInstance(); //Use the default (non-validating) parser
            spf.setValidating(true);
            // Create a JAXP SAXParser
            final SAXParser saxParser = spf.newSAXParser();
            // Get the encapsulated SAX XMLReader
            xmlReader = saxParser.getXMLReader();
            xmlReader.setContentHandler(this);
            xmlReader.setDTDHandler(this);
            xmlReader.setEntityResolver(this);
            xmlReader.setErrorHandler(this);
        }//XMLHandler()
          * Add XMLListener to receive XML events from the current XML document.
         *  If <i>listener</i> is null, no exception is thrown and no action is performed.
          * @param listener XMLListener to add.
         public void addXMLEventListener(final XMLListener listener) {
            if (listener != null) {
                listeners.add(listener);
        }//addXMLEventListener()
         * Parse current XML document. Registered XMLEventListeners will receive events during parsing.
         * @param fileName Name of file to read XML content from.
         * @throws Exception
        public void parse(final String fileName) throws Exception {
            if (fileName != null) {
                parse(IOUtils.openInputStream(fileName));
        }//readXML()
          * Parse current XML document. Registered XMLEventListeners will receive events during parsing.
         * @param inputStream InputStream to read XML content from.
          * @throws Exception
         public void parse(final InputStream inputStream) throws Exception {
            if (inputStream != null) {
                xmlReader.parse(new InputSource(inputStream));
        }//readXML()
         * Overwrite super.
         * Receive notification of the beginning of the document.
        @Override
        public void startDocument() {
            for (XMLListener l : listeners) {
                l.documentStarted();
        }//startDocument()
         * Overwrites super.
         * Receive notification of the start of an element.
        @Override
        public void startElement(final String uri, final String localName, final String qName, final Attributes atts) {
            elementStack.push(qName);
            for (XMLListener l : listeners) {
                l.elementStarted(qName, elementStack);
            elementValue = new StringBuilder(); //element value
            //element attributes:
            if (atts.getLength() > 0) {
                String attName = null;
                for (int i = 0; i < atts.getLength(); i++) {
                    attName = atts.getQName(i);
                    final String attValue = atts.getValue(i);
                    for (XMLListener l : listeners) {
                        l.attributeRead(qName, attName, attValue);
                }//next attribute
            }//else: no attributes
        }//startElement()
         * Overwrites super.
         * Receive notification of character data inside an element. This method can be called multiple times
         * from SAX, so we need to append all results of all calls to the final element value.
        @Override
        public void characters(final char ch[], final int start, final int length) {
            String s = new String(ch, start, length);
            elementValue.append(s);
        }//characters()
         * Overwrites super.
         * Receive notification of the end of an element.
        @Override
        public void endElement(final String uri, final String localName, final String qName) {
            for (XMLListener l : listeners) {
                l.elementEnded(qName, elementValue.toString());
            elementStack.pop();
        }//endElement()
         * Overwrite super.
         * Receive notification of the end of the document.
        @Override
        public void endDocument() {
            for (XMLListener l : listeners) {
                l.documentEnded();
        }//endDocument()
    }//XMLHandler

  • No Progress Bar when importing from Camera

    I just updated to iLife 06, and I noticed when I was importing new photo's into iPhoto 6, that the progress bar does not move. The photo's import fine, but I have no idea of the approximate time it will take, since the progress bar never shows up.
    Has anyone else seen this? Is there any pref files I can clean out to see if I can get this feature back?
    Thanks, and sorry if this has been discussed, but I could not find anything when searching the forums for this issue.
    - Bruce

    Well, I just imported 10 photo's and the progress bar worked. My previous import where the progress bar did not work, had 125 photo's, with two of them locked. I have removed the locked photo's, and removed the regular photo's, and now the progress bar works. I do not know if it was because there was 125 photo's or if it was because I had a few locked photo's, but now it seems to be working.
    I will test things out by locking some more photo's and seeing if the progress bar shows up when I import. I also chose to delete the original photo's after importing them.
    Has anyone else imported a lot of pictures, and had a few locked on the camera, and noticed if the progress bar works or not?
    - Bruce

  • Progress Bar/Fast Start

    I exported a hyperlink only movie out of Keynote 3. I then inserted into my webpage. If a person clicks on the first hyperlink to go to the next slide it only goes a few frames and then freezes. There is not enough information buffered to move it along.
    What I would like is to have some kind of download progress bar that shows up below the QuickTime so people know to wait. However, I don't want to lose the hyperlinks.
    You can see it at: www.youbelong.net > journal information > instructions
    Any help would be greatly appreciated.

    Hey Granny, I love your apples.
    You could try opening your movie in QuickTime Player (Pro) and then going to the Window menu, Show Movie Properties.
    Click on the Video track to select it and then click on the "Other Settings" button in the gray area below. Check the boxes for "Preload this track" and "Cache (hint)". Repeat for the Sprite track (not sure that that's necessary though) and then save the movie...

Maybe you are looking for