Progress bar in Table ivew

Hi all,
is it possible to have a progress bar a table view?
After some test I have not got the result I need: I have set, in the expression field for that progress bar column, a numeric field (the numeric field belongs to the custom table I am reading), but the progress bars are completely full for each row of the output table (even though values are differents).
Thank you,
Diego.

Hi Mario,
thank you for the solution you suggested me. Now I just have to "persuade" my users!
Jokes apart, I have also tried to import 5 GIF images, because 5 are the possible values of the numerical column, conditioning the visualization but during the rendering they were scaled (because of the height of the table row) and the bar images I have imported appeared invisibles and centered... not a big result!
At times the imagination can be helpful but not this case.
Thank you again.
Diego.

Similar Messages

  • 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

  • Issue regarding Progress Indicator on table row selection

    Hi Team,
    I have overridden onSelectionListener on a table. On click of any record in the table I am performing some operation which takes few seconds to execute. So, I have to show a processing bar on click of any records in the table till the execution completes. I have added a .gif image as the progress Indicator and referring this in the client attribute of the output text in the columns in the table.
    --Code added for the output text in table column
    <af:column sortProperty="#{bindings.XxqaSSCOrderInfoRO11.hints.TagNumber.name}"
    sortable="false" headerText="#{emqacerts_uiBundle.TAG_NUMBER}" id="c9"
    filterable="true" align="center"
    inlineStyle="#{row.sn_status eq 'PRINT'?'background-color:#c4ff94;' : row.sn_status eq 'DRAFT'? 'background-color:#ffefa3;':'background-color:#ffffff;'}">
    <af:inputText value="#{row.bindings.TagNumber.inputValue}"
    label="#{bindings.XxqaSSCOrderInfoRO11.hints.TagNumber.label}"
    required="#{bindings.XxqaSSCOrderInfoRO11.hints.TagNumber.mandatory}"
    columns="#{bindings.XxqaSSCOrderInfoRO11.hints.TagNumber.displayWidth}"
    maximumLength="#{bindings.XxqaSSCOrderInfoRO11.hints.TagNumber.precision}"
    shortDesc="#{bindings.XxqaSSCOrderInfoRO11.hints.TagNumber.tooltip}"
    id="it6" clientComponent="true">
    <f:validator binding="#{row.bindings.TagNumber.validator}"/>
    <af:clientAttribute name="loadingIndicatorId"
    value="#{backing_Pages_MainPage.loadingIndicatorId}"/>
    <af:clientListener method="showWhenBusy" type="click"/>
    </af:inputText>
    </af:column>--Code in the backing bean
    public void setLoadingBox(RichPanelBox loadingBox) {
    this.loadingBox = loadingBox;
    public RichPanelBox getLoadingBox() {
    return loadingBox;
    public String getLoadingIndicatorId() {
    return getLoadingBox().getClientId(FacesContext.getCurrentInstance());
    }--Code in the jsff page for the image
    <af:panelBox text="#{emqacerts_uiBundle.PROCESSINGPLEASEWAIT}" id="pb10" clientComponent="true"
    binding="#{backing_Pages_MainPage.loadingBox}" inlineStyle="display:none;"
    titleHalign="center" background="dark" showDisclosure="false" ramp="highlight">
    <af:panelGroupLayout id="pgl5" layout="horizontal" halign="center">
    <af:spacer width="60" height="10" id="s1"/>
    <af:image source="/images/progress.gif" id="i1"/>
    </af:panelGroupLayout>
    </af:panelBox>--JavaScript
    <af:resource type="javascript">
    //Global variable to hold the component ref.
    var loadingIndicatorComponent;
    function showWhenBusy(event) {
    //get the dialog or other component we want to show and hide
    var componentId = event.getSource().getProperty('loadingIndicatorId');
    loadingIndicatorComponent = AdfPage.PAGE.findComponent(componentId);
    if (loadingIndicatorComponent != null) {
    AdfPage.PAGE.addBusyStateListener(loadingIndicatorComponent, handleBusyStateCallback);
    event.preventUserInput();
    else {
    AdfLogger.LOGGER.logMessage(AdfLogger.SEVERE, "Requested indicator compoenent not found");
    function handleBusyStateCallback(event) {
    if (loadingIndicatorComponent != null) {
    // Check is this is a dialog as
    // this needs different treatment
    var isDialog = (loadingIndicatorComponent.getComponentType() == "oracle.adf.RichPopup");
    if (event.isBusy()) {
    if (isDialog) {
    loadingIndicatorComponent.show();
    else {
    loadingIndicatorComponentId = AdfAgent.AGENT.getElementById(loadingIndicatorComponent.getClientId());
    loadingIndicatorComponentId.style.display = "inherit";
    else {
    if (isDialog) {
    loadingIndicatorComponent.hide();
    else {
    loadingIndicatorComponentId = AdfAgent.AGENT.getElementById(loadingIndicatorComponent.getClientId());
    loadingIndicatorComponentId.style.display = "none";
    AdfPage.PAGE.removeBusyStateListener(loadingIndicatorComponent, handleBusyState);
    </af:resource>My problem is, if I click on any record in the table for first time, progress bar is not displayed. But from second click of any record, it starts displaying.
    If anyone has any idea on this then please let me know what the issue is.
    Thanks in advance,
    Kavitha

    Hi John,
    Thanks for your quick reply. I tried using af|statusIndicator component. But this doesnt disable the components on the page while the server is busy.
    Is there any way to disable the page/make the page read only when the processing is happening ?
    Thanks in advance,
    Kavitha

  • Creating Progress Bar for File Upload

    Hi, I'm trying to implement a progress bar indicator for a file upload in WebDynpro, without very good results.
    I'm using a fileupload UI element, a TimerTrigger and a ProgressIndicator UI elements for this purpose.
    It seems that using the fileupload UI element the iview is locked during the file upload, and therefore it prevents for the timer triggered action to be performed (this action updates the progress bar).
    Additionally I havent been able to capture the transfered bytes from the upload. Maybe I'm using the wrong elements?
    How could I achieve this. Has anyone done it?
    I would really appreciate all the help I could get.
    Homer Vargas

    Hi,
    Can anyone please tell me the way to upload file from client system to server.
    The code i have is as follows:-
    Jsp:-
    function saveImage(){
         //projectname.javafilename
         var strStatus = "save";
         document.saveImageForm.action="/irj/servlet/prt/portal/prtroot/TestXML.TextImageLink?frmstatus="+ strStatus;
         document.saveImageForm.method="post";
         document.saveImageForm.submit();     
    <form name="saveImageForm" encrypt="multipart/form-data">
    <table width="388" cellpadding="1" cellspacing="1" bgcolor="#F0F0F0" border='0'>
           <tr>
                 <td><font color="blue" face="verdana" size="2">IMAGE:</font></td><td><input id="image" type="file" name="image" value=""/></td>
         </tr>
    <tr>
         <td><input type="submit" name="submit" value="Submit" onclick="saveImage();"/></td>
         </tr>
    </table>
    </form>
    now i am not getting what to write in java file
    using IPortalComponentRequest.
    Using the jsp file upload in tomcat is working but here it is not working
    please help meee
    Thanks in Advance
    Regards
    Sirisha

  • Progress bar in JTable?

    Hi,
    I have written a cell renderer for a progress bar but I can't set its string or make it indeterminate. Has anybody done this before? Should I write my own, or use JProgressBar (currently using JProgressBar).
    any help would be brilliant

    Here is a little example I made which shows the JProgressBar being updated.
    Everytime a row is clicked the progress bar adds one percent
    import javax.swing.*;
    import javax.swing.table.*;
    import java.awt.*;
    import javax.swing.event.ListSelectionEvent;
    import javax.swing.event.ListSelectionListener;
    public class TableProgress extends JFrame{
         public TableProgress(){
              super("Table Progress");
              setSize(500,115);
              Container theContainer = getContentPane();
              String[] headers = {"Name", "Percent Complete", "Progress"};
              Object[][] data = {
                   {"John Adams","50",createBar(50, "50%")},
                   {"Ben Franklin","75",createBar(75, "75%")},
                   {"Karl Marx","0",createBar(0, "0%")},
                   {"Gandalf","20",createBar(20, "20%")},
                   {"Clint Eastwood","55",createBar(55, "55%")}
              final JTable theTable = new JTable(data, headers);
              theTable.setPreferredSize(new Dimension(500,100));
              theTable.getColumn("Progress").setCellRenderer(new ProgRenderer());
              ListSelectionModel rowSM = theTable.getSelectionModel();
              rowSM.addListSelectionListener(new ListSelectionListener() {
                  public void valueChanged(ListSelectionEvent e) {
                      //Ignore extra messages.
                      if (e.getValueIsAdjusting()) return;
                      ListSelectionModel lsm =
                          (ListSelectionModel)e.getSource();
                      if (lsm.isSelectionEmpty()) {
                      } else {
                          int selectedRow = lsm.getMinSelectionIndex();
                          JProgressBar theBar = (JProgressBar)theTable.getValueAt(selectedRow, 2);
                          theBar.setValue(theBar.getValue()+1);
                          theBar.setString(String.valueOf(theBar.getValue()));
                          System.out.println(selectedRow);
              theContainer.add(theTable);
              setVisible(true);
              show();
         public JProgressBar createBar(int percentDone, String text){
              JProgressBar progressBar = new JProgressBar(0, 100);
              progressBar.setStringPainted(true);
              progressBar.setValue(percentDone);
              progressBar.setString(text);
              return progressBar;
         private class ProgRenderer implements TableCellRenderer{
              public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column){
                   return (JProgressBar)value;
         public static void main(String[] args){
              TableProgress theTable = new TableProgress();
    }

  • Progress bar in a JProgressBar component is not always drawn

    Hi experts,
    I have a strange issue with a swing application. This app contains of a JFrame including a JTable. This table has multiple columns, one of them is a JProgressBar (implementing a TableCellRenderer). Multiple background threads are running, every of them updates one row's progress bar via the InvokeLater() method. This works fine.
    At a specific point within the runtime of the application, the value of a progress bar is set back to 0, and instead of the default percentage text a custom string is displayed (then continuing to progress with this custom text set). This works fine as well.
    Problem is, that when a custom string is set to one progress bar as described above, then the bars of the other JProgressBars are not painted any more. But the default percentage text of these other JProgressBars are still incremented and painted correctly. When the one progress bar, that has the custom string set, has finished and this row is removed from table, then the other progress bars are again painted correctly (including the default percentage text).
    A part of the custom TableCellRenderer class is shown here:
         public class ProgressRenderer extends JProgressBar implements TableCellRenderer
         public ProgressRenderer()
              super(SwingConstants.HORIZONTAL);
              setBorderPainted(false);
              setStringPainted(true);
         public Component getTableCellRendererComponent(JTable table, Object value,
              boolean isSelected, boolean hasFocus, int row, int column)
              if(value != null)
                   setValue(((JProgressBar) value).getValue());
                   setString(((JProgressBar) value).getString());
                   setMinimum(((JProgressBar) value).getMinimum());
                   setMaximum(((JProgressBar) value).getMaximum());
              return this;
    ...Any ideas what could be wrong here?
    I am really out of ideas here :(
    Thanks in advance for your help!
    Kind regards, Matthias

    I have solved the problem:
         public Component getTableCellRendererComponent(JTable table, Object value,
              boolean isSelected, boolean hasFocus, int row, int column)
              if(value != null)
                   setString(((JProgressBar) value).getString());
                   setMinimum(((JProgressBar) value).getMinimum());
                   setMaximum(((JProgressBar) value).getMaximum());
                   setValue(((JProgressBar) value).getValue());
              return this;
         }

  • Add Progress Bar to a query component (ViewCriteria)

    Hi,
    I would like to add a progress bar (or any relevant component to show the process is going on) to QueryComponent (ViewCriteria).
    Please guide me how to achieve this.
    Thanks.

    I have solved the problem:
         public Component getTableCellRendererComponent(JTable table, Object value,
              boolean isSelected, boolean hasFocus, int row, int column)
              if(value != null)
                   setString(((JProgressBar) value).getString());
                   setMinimum(((JProgressBar) value).getMinimum());
                   setMaximum(((JProgressBar) value).getMaximum());
                   setValue(((JProgressBar) value).getValue());
              return this;
         }

  • Progress Bar in Report

    Hey Everyone,
    I have implemented a Progress Bar in a column in a report based on Denes Kubiceks example,
    http://htmldb.oracle.com/pls/otn/f?p=31517:183:6301951045064123::NO
    The issue im having is depending on which browser i use i get slightly different out put on the progress bar, small but anoying.
    In Firefox if the bar is at 100% it is all one colour, as it should be. However when i use IE if the bar is at 100% there is still a hint of red at the end of the progress bar, as if it is on 99%.
    What i need to know is, is this simply a browser issue? or is there somthing i could do about it?
    Thanks in Advance,
    -N.S.N.O.

    Hello,
    to me it looks like a browser issue. Apparently the IE cannot render an image with width="0" and therefor always renders it with width="1". Opera does the same.
    You could try using a background color instead for the table cell and just the green image instead of two images side by side.

  • Implements the progress bar in user defined form

    Hi Experts,
    As i am new to SAP B1 add on development field so i wants  to set the progress bar in user defined screen through sdk code. Can you guide me?
    Regards,
    silambu

    Rahul,
             It is really helped to me. But progress bar only showed.I need  Loading part  mention by some color or something..
    my coding...
    Dim progress As SAPbouiCOM.ProgressBar
    progress = oApplication.StatusBar.CreateProgressBar("Importing Data From Excel", oMatrixTml.VisualRowCount, True)
               progress.Value = 0
                For i As Integer = 0 To dataset.Tables(0).Rows.Count - 1
                    If i <> 0 Then
                        oGFun.SetNewLine(oMatrixTml, oDBDSDetail, 0, "")
                        oDBDSDetail.SetValue("U_Check", i - 1, "Y")
                        oDBDSDetail.SetValue("U_DelrCode", i - 1, dataset.Tables(0).Rows(i)("F3").ToString)
                        oDBDSDetail.SetValue("U_OrdrType", i - 1, dataset.Tables(0).Rows(i)("F4").ToString)
                        oDBDSDetail.SetValue("U_OrderNo", i - 1, dataset.Tables(0).Rows(i)("F6").ToString)
                        oMatrixTml.LoadFromDataSource()
                        progress.Value += 1
                    End If
                Next
               progress.Stop()   // stop the progress bar
                progress = Nothing
    Thanks,
    Silambu

  • Indeterminate progress bar in JTable?

    Hi,
    Does anybody know why my code isn't working? It does not display an indeterminate progress bar in the column I have set my cell renerer to.
    Here is my code
    public void setTableReneders()
            TableColumn col = _Table.getColumnModel().getColumn(2);
            col.setCellRenderer(new ProgessBarRenderer(0, true));
    public class ProgessBarRenderer extends JProgressBar implements TableCellRenderer {
            // This method is called each time a cell in a column
            // using this renderer needs to be rendered.
            public int _Progress = 0;
            public boolean _InDer = false;
            public ProgessBarRenderer(int progress, boolean inDer)
                _InDer = inDer;
                _Progress = progress;
            public Component getTableCellRendererComponent(JTable table, Object value,
                    boolean isSelected, boolean hasFocus, int rowIndex, int vColIndex) {
                // 'value' is value contained in the cell located at
                // (rowIndex, vColIndex)
                if (isSelected) {
                    // cell (and perhaps other cells) are selected
                if (hasFocus) {
                    // this cell is the anchor and the table has the focus
                // Configure the component with the specified value
                this.setValue(_Progress);
                this.setIndeterminate(_InDer);
                // Set tool tip if desired
                //setToolTipText((String)value);
                // Since the renderer is a component, return itself
                return this;
            // The following methods override the defaults for performance reasons
            public void validate() {}
            public void revalidate() {}
            protected void firePropertyChange(String propertyName, Object oldValue, Object newValue) {}
            public void firePropertyChange(String propertyName, boolean oldValue, boolean newValue) {}
    }Any help would be brilliant

    I wouldn't like to use a Timer to perform an update...Then you don't understand how a JTable works. The cell will only repaint itself when the contents of the cell changes. You don't change the progress bar, you only change the value represented by the progress bar so the table never knows when to repaint itself. You should be able to use a Timer to force a cell to repaint itself. That way if the value of the progress bar has changed then this change should be reflected in the repainting of the progress bar.
    I've never tried it, but there's an example here. I don't know if it uses a Timer or some other approach.
    http://www.objects.com.au/java/examples.do

  • 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

  • Progress bar inside datagrid

    Hi All,
    I have a datagrid in which i have to display progress bar with the task completed in %.
    for example i have  two fields in a table source count and completion count.
    where source count in 100000 rows and 50000 rows have been inserted.
    in another table and status is displayed in the table.
    so i need to display in a progress bar that 50% task has been completed.
    Any suggestions or ideas.
    Sample ex:

    Hello,
    here is something to play with:
    public class ProgressInTableTest {
        private static final Random RANDOM = new Random();
        private final class RunnableDummyProgressProducer implements Runnable {
            private final DefaultTableModel defaultTableModel;
            private final JProgressBar allProgress;
            private RunnableDummyProgressProducer(
                    DefaultTableModel defaultTableModel, JProgressBar allProgress) {
                this.defaultTableModel = defaultTableModel;
                this.allProgress = allProgress;
            @Override
            public void run() {
                for (int i = 0; i < progressEntries.size(); i++) {
                    ProgressEntry progressEntry = progressEntries.get(i);
                    while (100 > progressEntry.progress * 100
                            / progressEntry.fileSize) {
                        progressEntry.progress += 10;
                        defaultTableModel.fireTableCellUpdated(i, 2);
                        try {
                            Thread.sleep(50);
                        } catch (InterruptedException e) {
                            e.printStackTrace();
                    progressEntry.progress = progressEntry.fileSize;
                    SwingUtilities.invokeLater(new Runnable() {
                        @Override
                        public void run() {
                            allProgress.setValue(allProgress.getValue() + 1);
                            allProgress.setString(String.format("%s / %s",
                                    allProgress.getValue(),
                                    allProgress.getMaximum()));
                    defaultTableModel.fireTableCellUpdated(i, 2);
        private final class DefaultTableCellRendererExample extends
                DefaultTableCellRenderer {
            private static final long serialVersionUID = 1L;
            @Override
            public Component getTableCellRendererComponent(JTable table,
                    Object value, boolean isSelected, boolean hasFocus, int row,
                    int column) {
                Component rendererComponent = super.getTableCellRendererComponent(
                        table, value, isSelected, hasFocus, row, column);
                JTextField newRenderer = new JTextField();
                ProgressEntry progressEntry = progressEntries.get(row);
                switch (progressEntry.progress * 100 / progressEntry.fileSize) {
                case 0:
                    newRenderer.setText("pending");
                    return newRenderer;
                case 100:
                    newRenderer.setText("done");
                    return newRenderer;
                default:
                    rendererComponent = new JProgressBar(0, progressEntry.fileSize);
                    JProgressBar jProgressBar = (JProgressBar) rendererComponent;
                    jProgressBar.setValue(progressEntry.progress);
                    jProgressBar.setStringPainted(true);
                return rendererComponent;
        private final class DefaultTableModelExample extends DefaultTableModel {
            private static final long serialVersionUID = 1L;
            private final String[] columnNames = { "file name", "file size",
                    "progress" };
            private DefaultTableModelExample(int rowCount, int columnCount) {
                super(rowCount, columnCount);
            @Override
            public String getColumnName(int column) {
                return columnNames[column];
            @Override
            public Class<?> getColumnClass(int collumn) {
                switch (collumn) {
                case 1:
                    return Integer.class;
                case 2:
                    return ProgressEntry.class;
                default:
                    return String.class;
            @Override
            public Object getValueAt(int row, int column) {
                switch (column) {
                case 0:
                    return progressEntries.get(row).fileName;
                case 1:
                    return progressEntries.get(row).fileSize;
                case 2:
                    return progressEntries.get(row).progress;
                default:
                    return super.getValueAt(row, column);
        public class ProgressEntry {
            private final String fileName;
            private final int fileSize;
            private int progress = 0;
            public ProgressEntry(String fileName, int fileSize) {
                this.fileName = fileName;
                this.fileSize = fileSize;
        private final List<ProgressEntry> progressEntries = new ArrayList<ProgressEntry>();
        @Test
        public void test() {
            initializeSampleData();
            JProgressBar allProgress = createFileCountProgress();
            DefaultTableModel defaultTableModel = new DefaultTableModelExample(
                    progressEntries.size(), 3);
            JTable table = createTable(defaultTableModel);
            startDummyProcess(allProgress, defaultTableModel);
            JPanel message = completeGUI(allProgress, table);
            JOptionPane.showMessageDialog(null, message, "ProgressTest",
                    JOptionPane.PLAIN_MESSAGE);
        private JPanel completeGUI(final JProgressBar allProgress, JTable table) {
            JPanel message = new JPanel(new BorderLayout());
            message.add(new JScrollPane(table), BorderLayout.CENTER);
            message.add(allProgress, BorderLayout.SOUTH);
            return message;
        private void startDummyProcess(final JProgressBar allProgress,
                final DefaultTableModel defaultTableModel) {
            new Thread(new RunnableDummyProgressProducer(defaultTableModel,
                    allProgress), "ProgressTest").start();
        private JTable createTable(final DefaultTableModel defaultTableModel) {
            JTable table = new JTable(defaultTableModel);
            table.setDefaultRenderer(ProgressEntry.class,
                    new DefaultTableCellRendererExample());
            return table;
        private JProgressBar createFileCountProgress() {
            final JProgressBar allProgress = new JProgressBar(0,
                    progressEntries.size());
            allProgress.setStringPainted(true);
            return allProgress;
        private void initializeSampleData() {
            for (int i = 0; i < 20; i++) {
                progressEntries.add(new ProgressEntry(String.format("IMG_%03d.jpg",
                        i), RANDOM.nextInt(1000)));
            for (int i = 0; i < 3; i++) {
                progressEntries.get(i).progress = progressEntries.get(i).fileSize;
            progressEntries.get(3).progress = 50;
    bye
    TPD

  • Progress Bar of a Database Transaction

    Hi,
    Is it possible to have a progress bar showing the progress a Database Transaction?
    I use MS Access and a PreparedStatement which I fill up with addBatch() and then I execute with executeBatch().
    Inserting in an Access Table 10.000 new entries takes about a minute...
    Instead of having the user wait with a message "Please wait..."
    can I track its progress somehow?
    Thanks!!!

    Unfortunately, I don't think that there's a standard way to get asynchronous responses back from the database on the status of your batches. You could fake it by figuring out the "standard" time it takes, but otherwise you're in the dark about your statement's status.

  • Progress Bar with Javascript

    Hi,
    I have a page that is used as a search
    page that uses sql "like" queries.As
    you know it takes an awfull lot of time
    to search through 30,000 records using
    a "like" statement,so i'd figured I create a nice
    javascript progress bar to be displayed until
    the results come up.Does anyone know how
    to do this?
    So when the search button is clicked then the
    progress bar/REGION should be display and
    when the results come up, the progress bar should
    be hidden.
    Any good suggestions?

    The way I did it is
    I added this javascript to the page header:
    <script language="JavaScript" type="text/javascript">
    <!--
    /*- id can be element or nd or name returns element node */
    function html_GetElement(nd){
         switch(typeof (nd)){
         case 'string':node = document.getElementById(nd);break;
              case 'object':node = nd;break;
    default:node = null;break;
         return node;
    function html_CascadeUpTill(START,TAG){
    var node = html_GetElement(START);
         if(node){
         var node = node.parentNode;
    while(node.nodeName != TAG){
         node = node.parentNode;
         return node;
    /*- hides given node */
    function html_HideElement(nd){
         var node = html_GetElement(nd);
         node.style.display = "none";
    return node
    /*- show given node */
    function html_ShowElement(nd){
         var node = html_GetElement(nd);
         node.style.display = "";
    return node
    /*- toggle node visibility */
    function html_ToggleElement(nd){
         var node = html_GetElement(nd);
         if(node.style.display == "none"){html_ShowElement(node)}
         else{html_HideElement(node)}
         return node
    var g_LastRowOpened = false;
    var g_LastDetailLabel = false;
    var g_ShowOnlyOne = false;
    function showdetail(t,i){
         var l_TR = html_CascadeUpTill(t,'TR');
         var l_ThisTable = html_CascadeUpTill(t,'TABLE');
         /* comment out following if statement if you don't care about only showing one at a time */
         if(html_GetElement('P1_MULTI_0').checked==false && g_LastRowOpened && g_LastRowOpened != l_TR){
              ShowHideDetailRow(g_LastDetailLabel,l_ThisTable,g_LastRowOpened,i); //hides last row shown and resets label
         ShowHideDetailRow(t,l_ThisTable,l_TR,i);     
         g_LastDetailLabel = t; // set the last show/hide_detail clicked
         g_LastRowOpened = l_TR; // set the last row clicked     
    function ShowHideDetailRow(pThis,pTable,pTR,pID){
         var l_NumCells = pTR.cells.length;     
         if(pTR.rowIndex == pTable.rows.length-1 || pTable.rows[pTR.rowIndex+1].className != "detail"){
              var myNewRow = pTable.insertRow(pTR.rowIndex+1);
              myNewRow.className = "detail";
              var myNewCell = myNewRow.insertCell(0);
              myNewCell.className = "t4data";
              myNewCell.colSpan=l_NumCells;
              myNewCell.appendChild(html_GetElement(pID));
              html_ShowElement(pID);
         }else{
              html_ToggleElement(pTable.rows[pTR.rowIndex+1]);
         SetDetailLabel(pThis);
    function SetDetailLabel(pThis){
         if(pThis.innerHTML == 'show_detail'){
              pThis.innerHTML = 'hide_detail'
         }else{
              pThis.innerHTML = 'show_detail'
    //-->
    </script>
    then made my button a URL target and added:
    javascript:html_ShowElement('AjaxLoading');doSubmit('SEARCH');
    and finally added this to my HTML's region source:
    <style>     #AjaxLoading{padding:5px;font-size:18px;width:200px;text-align:center;left:50%;top:50%;position:absolute;border:2px solid #666;background-color:#FFF;}
    </style>
    <div id="AjaxLoading" style="display:none;">..Loading..
    <img src="#WORKSPACE_IMAGES#processing3.gif" /></div>
    I know its a bit amatuer but it seems to be working fine.
    The only problem that I've got is that it doesnt work when hitting <Return> to do the search rather than clicking on the search button.
    rather than

  • Progress bar code

    Dear All
    Can you please help me with code which shows the progress bar movement until the loop is finished.
    Thank you in advance
    Regards
    William

    I use something like this... assuming i_afpo  is the table need to be processed
      DATA : lv_per     TYPE syst-tabix     ,
             lv_lst_p   TYPE syst-tabix     ,
             lv_total   TYPE syst-tabix     ,
             lv_char    TYPE string         .
      DESCRIBE TABLE i_afpo LINES lv_total .
      LOOP AT i_afpo ASSIGNING <fs_afpo> .
    *   Progress Indicator
        lv_lst_p = ( sy-tabix  * 100  ) / lv_total .
    *   There is no point in updating frontend if % remains same
        IF lv_lst_p NE lv_per .
          lv_per = lv_lst_p .
          lv_char = lv_per .
          CONCATENATE 'Processing'(002)
                      lv_char
                      '%'(003)
                 INTO lv_char
            SEPARATED BY space .
          CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
            EXPORTING
              percentage = lv_per
              text       = lv_char.
        ENDIF.
      ENDLOOP.

Maybe you are looking for