Implementing reusable Progressbar component

hello,
I want to make a ProgressBar that is Reusable, that is once developed, it
should simply be reusable with any other applications which may require this
functionality.
The ProgressBar Component that i want to develop should include the
following functionalities:
1. It should show the progress as a Percentage.
2. it should also show me the total bytes that have been transferred so far,and
calculate and show me the remaining bytes left so far to transfer(I want this
feature as i am going to use this progressbar in file uploading)
3. it should also show me the total file uploading time required,time elapsed so
far and the total time left to upload the file.
Can anyone help as regards the above tasks?
Any help would be dearly appreciated...
Thanks in anticipation
sd

Thanks, Mr Dylen for the Link u gave me, but i had already gone thru that,
what i basically wanted to know was how to implement this ProgressBar as
a Reusable Component in such a way that it can be simply merged with any other application, that might need a similar functionality.
Once again i say, i want to develop it as a Independent Module, so that it
can be merged with any other application.
Secondly, that Link which u gave and which (i had gone thru already before u gave me) doesn't specify anything about how to calculate bytes transferred, bytes received,bytes remaining, time elapsed,time left etc...
the issues which i raised in my 2nd and 3rd points(if u read my query carefully).
so where and how do i get the code for my above functionality?
so i am still looking forward to a complete response to my same earlier query.
I hope u r able to help..
sorry to bother u again on the same question...but the above is what i basically needed.
I"ll be eagerly looking forward to your response once again..with the above
queries.
Regards
Thanks in anticipation
sd

Similar Messages

  • Best approach to implement reusable confirmation dialog ?

    Hi,
    What's the best approach to implement reusable confirmation dialogs with ADF 11g?
    e.g.: "Do you realy want to delete this client record (yes/no)?" should be used on several pages but with different message text.
    Also I have to know in the calling page which button (yes, no, ...) the user has pressed in the af:dialog.
    If it's af:popup is it possible to place af:dialog within page template to avoid placing af:popup within each page?
    regards
    Peter

    Hi,
    What's the best approach to implement reusable confirmation dialogs with ADF 11g?
    e.g.: "Do you realy want to delete this client record (yes/no)?" should be used on several pages but with different message text.
    Build a declarative component
    Also I have to know in the calling page which button (yes, no, ...) the user has pressed in the af:dialog.
    You can do this through a method reference in a declarative component. Its a method on the calling page's managed bean that is invoked from the declarative component
    If it's af:popup is it possible to place af:dialog within page template to avoid placing af:popup within each page?
    May not make sense but should be possible
    Frank

  • Best practice question for implementing a custom component

    I'm implementing a custom component which renders multiple <input type="text" .../> controls as part of it. The examples I've seen that do something similar use the ResponseWriter to generate the markup "by hand" like:
         writer.startElement("input", component);
         writer.writeAttribute("type", "text", null);
         writer.writeAttribute("id", "foo", null);
         writer.writeAttribute("name", "foo", null);
         writer.writeAttribute("value", "hello", null);
         writer.writeAttribute("size", "20", null);
         writer.endElement("input");
    I don't know about anyone else, but I HATE having to write code that manufactures this stuff - seems to me that there are already classes that do this, so why not just use those? For example, the above could be replaced with:
         HtmlInputText textField = new HtmlInputText();
         textField.setId("foo");
         textField.setValue("hello");
         textField.setSize(20);
         // just to be safe, invoke both encodeBegin() and encodeEnd(),
         // though it seems like encodeEnd() actually does the work in this case,
         // but who knows if they might change it at some point
         textField.encodeBegin(context);
         textField.encodeEnd(context);
    So my question is, why does everyone seem to favor the former over the latter? Why not leverage objects that already do the (encoding) work for you?

    Got it!
    You JSP should have this:
    <h:panelGroup styleClass="jspPanel" id="jspPanel1"></h:panelGroup>
    And your code page ValueChangeListener/ActionListner should have this:
              if (findComponent(getForm1(),"myOutputText") == null)
                   FacesContext facesCtx = FacesContext.getCurrentInstance();
                   System.out.println("Adding component");
                   HtmlOutputText output =
                        (HtmlOutputText) facesCtx.getApplication().createComponent(
                             HtmlOutputText.COMPONENT_TYPE);
                   output.setId("myOutputText");
                   output.setValue("It works");
                   getJspPanel1().getChildren().add(output);          
                   System.out.println("Done");
                   DebugUtil.printTree(FacesContext.getCurrentInstance().getViewRoot(),System.out);
              else
                   System.out.println("component already added");
    I just have to figure out this IOException on the closed stream - probably has to do with [immidiate="true"].
    Thanks.
    [9/15/04 13:05:53:505 EDT] 6e436e43 SystemErr R java.io.IOException: Stream closed
    [9/15/04 13:05:53:536 EDT] 6e436e43 SystemErr R      at java.lang.Throwable.<init>(Throwable.java)
    [9/15/04 13:05:53:536 EDT] 6e436e43 SystemErr R      at java.lang.Throwable.<init>(Throwable.java)
    [9/15/04 13:05:53:536 EDT] 6e436e43 SystemErr R      at org.apache.jasper.runtime.JspWriterImpl.ensureOpen(JspWriterImpl.java:294)
    [9/15/04 13:05:53:536 EDT] 6e436e43 SystemErr R      at org.apache.jasper.runtime.JspWriterImpl.write(JspWriterImpl.java:424)
    [9/15/04 13:05:53:536 EDT] 6e436e43 SystemErr R      at org.apache.jasper.runtime.JspWriterImpl.write(JspWriterImpl.java:452)
    [9/15/04 13:05:53:536 EDT] 6e436e43 SystemErr R      at com.ibm.faces.component.UIJspPanel$ChildrenListEx.add(UIJspPanel.java:114)
    [9/15/04 13:05:53:536 EDT] 6e436e43 SystemErr R      at pagecode.admin.Test.handleListbox1ValueChange(Test.java)
    [9/15/04 13:05:53:536 EDT] 6e436e43 SystemErr R      at java.lang.reflect.AccessibleObject.invokeImpl(Native Method)
    [9/15/04 13:05:53:536 EDT] 6e436e43 SystemErr R      at java.lang.reflect.AccessibleObject.invokeV(AccessibleObject.java:199)
    [9/15/04 13:05:53:536 EDT] 6e436e43 SystemErr R      at java.lang.reflect.Method.invoke(Method.java:252)
    [9/15/04 13:05:53:536 EDT] 6e436e43 SystemErr R      at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:126)
    [9/15/04 13:05:53:536 EDT] 6e436e43 SystemErr R      at javax.faces.component.UIInput.broadcast(UIInput.java:492)
    [9/15/04 13:05:53:536 EDT] 6e436e43 SystemErr R      at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:284)
    [9/15/04 13:05:53:536 EDT] 6e436e43 SystemErr R      at javax.faces.component.UIViewRoot.processDecodes(UIViewRoot.java:342)
    [9/15/04 13:05:53:536 EDT] 6e436e43 SystemErr R      at com.sun.faces.lifecycle.ApplyRequestValuesPhase.execute(ApplyRequestValuesPhase.java:79)
    [9/15/04 13:05:53:536 EDT] 6e436e43 SystemErr R      at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
    [9/15/04 13:05:53:536 EDT] 6e436e43 SystemErr R      at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90)
    [9/15/04 13:05:53:536 EDT] 6e436e43 SystemErr R      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
    [9/15/04 13:05:53:536 EDT] 6e436e43 SystemErr R      at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
    [9/15/04 13:05:53:536 EDT] 6e436e43 SystemErr R      at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
    [9/15/04 13:05:53:536 EDT] 6e436e43 SystemErr R      at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
    [9/15/04 13:05:53:536 EDT] 6e436e43 SystemErr R      at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
    [9/15/04 13:05:53:536 EDT] 6e436e43 SystemErr R      at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
    [9/15/04 13:05:53:536 EDT] 6e436e43 SystemErr R      at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
    [9/15/04 13:05:53:536 EDT] 6e436e43 SystemErr R      at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
    [9/15/04 13:05:53:536 EDT] 6e436e43 SystemErr R      at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:948)
    [9/15/04 13:05:53:536 EDT] 6e436e43 SystemErr R      at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:530)
    [9/15/04 13:05:53:536 EDT] 6e436e43 SystemErr R      at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:176)
    [9/15/04 13:05:53:536 EDT] 6e436e43 SystemErr R      at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:79)
    [9/15/04 13:05:53:552 EDT] 6e436e43 SystemErr R      at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:201)
    [9/15/04 13:05:53:552 EDT] 6e436e43 SystemErr R      at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)
    [9/15/04 13:05:53:552 EDT] 6e436e43 SystemErr R      at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:182)
    [9/15/04 13:05:53:567 EDT] 6e436e43 SystemErr R      at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)
    [9/15/04 13:05:53:567 EDT] 6e436e43 SystemErr R      at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
    [9/15/04 13:05:53:567 EDT] 6e436e43 SystemErr R      at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:610)
    [9/15/04 13:05:53:567 EDT] 6e436e43 SystemErr R      at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:435)
    [9/15/04 13:05:53:567 EDT] 6e436e43 SystemErr R      at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:593)
    [9/15/04 13:05:56:146 EDT] 6e436e43 SystemOut O Done

  • Implementing a Text Component

    Hi all, I have to implement a custom text component for a
    project im working on. I was hoping someone could give me
    some direction on how to implement the text storage.
    I wont need more than the regular 256 ascii characters and
    text sizes could reach 4+ megs.
    1 - an array list of bytes
    2 - a stringbuffer
    3 - a LONG string
    I was thinking about doing every line as an arraylist of bytes
    and then putting the line objects into an arraylist - as opposed
    to a contiguous list of bytes.
    that way moving through the data will be easier.
    As well, im most interested in knowing how they implement the
    actual component. I was going to draw the characters (im using
    custom fonts) onto a bufferedimage and then display them onto
    a custom component that will be a JPanel with a drawn on scrollbar
    that will control the drawing bounds.
    i was hoping someone with a knowledge of how Java implements
    text components could give a brief comment on how
    text is stored in memory and drawn on to the screen in a
    text component - id be forever grateful!
    i hear a lot of people say they read the Java source code but i
    wouldnt even know where to begin in such a process, lol.
    thanks!

    Secondly, I don't really understand what you are doing or
    why you feel you need to create a custom component to display textIm working on a mathematics project.
    There is an equation editor that has to be integrated with
    graphics routines (graphs, models etc).
    This JPanel will have keypresses mapped to symbols and
    special functions with the "text" formatted around the embedded
    graphics.
    The implementation will be easy - BUT it did get me curious
    on how the JVM implements a text component.
    From the internal representation (maybe stringbuffers?) to
    how it converts each Unicode char and then paints it into
    the component.
    After all looking up each char and then decoding the TrueType
    format (which i read uses a Virtual Machine with instruction sets)
    and drawing it (directly to the component or to an image?) seems
    like it would be intensive - but text components always seem
    very fast.

  • ProgressBar Component and Streaming Video

    Is it possible to connect the ProgressBar component to an
    FLVPlayback component which is streaming?

    Unless the video is completely downloaded to the iMac you can not rule out the Internet connection.
    Since it plays all other video with no problem the downloading stream would seem to be the source of the problem.
    I had cable modem and it is no guarantee of a fast connection. Also even having a fast connection on one end doesn't mean that the source of the video is pushing it all that fast.

  • Copying Reusable Module Component by using extended copy

    I created a new Application System (say B) in the RON and copied a Reusable Module Component from Application System A into B, by using extended copy.
    THE PROBLEM: the copied component is still referencing to the table in application system A instead of B. I would like that the table is referencing to the table in application system B.
    Other module components I copied (non reusable) are referencing to tables in
    application system B.
    What's going wrong?
    * Products used:
    Designer 6.5.88.4.0
    Database hosting repository : 8.1.7.3.0
    Client OS : Windows NT 4.0 sp 6
    Server OS : HP/UX
    Regards,
    Harm

    (You posted a new question as a answer to my question! )
    The default username/password, which is created by using the repository install script, is REPOS_MANAGER/MANAGER. With this username/password you can access the Repository Admin Utility and create new Designer/Repository users. These users must be existing database users.
    Warning: 8i personal Edition is not certified against Designer, that means there may appear problems. (e.g. generating Forms doesn't work). You better can install 8.1.7 Or 9i enterprise edition.
    regards,
    Harm

  • ProgressBar component

    Hi all, I have the following code attached to a progressbar
    component and doesnt work.
    I get the final position only (100%).
    Note that I put the mode to "manual".
    What did I miss?
    Thanks in advance

    Check with the following tutorial and know how to remove the progress bar after its loaded the image:
    http://www.republicofcode.com/tutorials/flash/as3loader/

  • Changing the ProgressBar component

    Hello there, I was just wondering, is there a way to change the way the ProgressBar component looks like? for example I'd like to keep its functionality but change its progress bar to a circular animation maybe?
    Any help would be so much appreciated. Thanks in advance!

    Make your animation inside of a movie clip. Go to main timeline. Put an instance of the ProgressBar on stage. Click to highlight. In your Parameters panel, change mode to Manual. Enter ProgressBar. Place your animation on frame 1 of the top most layer.
    (Optional)
    Delete out the other layers in the ProgressBar. In the Library, in the Component Assets folder, delete the ProgressBarSkin folder.

  • Implementing File Upload component + Java Mail

    Guys,
    Brief Intro : I have a form with some input fields. Upon submission of the form all the necessary information is submitted ro R/3 system and a mail is send to lets say administrators. I have Java Mail program for sending emails.
    My requirement : I want the users to give the FileUpload option in the form so that they can select the file and that file should be attached to email whcih I am sending upon form submission.
    Questions:
    1) How to check the path of the file where it gets uploaded.
    2) Does it get uploaded on the Server where I deploy my application.
    3) Any Solution/suggestion on how to implement the requirement stated above.
    Regards,
    <b>Chintan Virani.</b>

    Hi Chintan...
    File Uplaod UI Element is just to get the file path of the file from the client or presentation server i.e. our pc. Rest code to store the data is done in action of the upload button (not the browse button). So no file is formed automatically.
    Unless you write the code to read the file from the path selected, you cannot get the data bytes and unless you mention the path no file is made in the server.
    Better would be that you keep a file template in the mimes folder and at runtime you write to this file.
    The path of the file in the mimes folder is
    temp
    webdynpro
    web
    local
    <ProjectName>
    Components
    <Component Package>
    <File Name>
    This file can be attached to your mail as an attachement.
    Further reference...
    Re: how to create a file i mimes/ components folder
    Regards,
    Mahesh K.

  • Implementing a scrollable component w custom drawing

    Hi! I'm currently trying to implement a component, that does some custom drawing, and is scrollable, but if I add the drawing component
    on a JScrollPane, nothing shows up, no scrollbars, no custom drawing.
    If i just add the component with the custom drawing to a JFrame, it looks fine.
    http://www.iit.uni-miskolc.hu/~kovacs29/Painter.java
    Can you tell me what am i doing wrong?

    The problem with drawing was that I forgot to draw the background :)
    Here is the source code if anyone views this topic later:
    import java.awt.*;
    import javax.swing.*;
    public class Painter extends JComponent implements Scrollable {
         private static final long serialVersionUID = 1L;
         public Painter() {
              setMinimumSize(new Dimension(800, 500));
              setMaximumSize(new Dimension(800, 500));
              setPreferredSize(new Dimension(800, 500));
              setOpaque(true);
         public Dimension getPreferredScrollableViewportSize() {
              return getPreferredSize();
         public int getScrollableUnitIncrement(Rectangle visibleRect,
                   int orientation, int direction) {
              return 10;
         public int getScrollableBlockIncrement(Rectangle visibleRect,
                   int orientation, int direction) {
              return 25;
         public boolean getScrollableTracksViewportWidth() {
              return false;
         public boolean getScrollableTracksViewportHeight() {
              return false;
         protected void paintComponent(Graphics graphics) {
              Graphics g = graphics.create();
              // It wasnt drawing things right when scrolling because the next 2 lines were missing :)
              g.setColor(getBackground());
              g.fillRect(0, 0, getWidth(), getHeight());
              g.setColor(Color.RED);
              g.drawLine(0, 0, getWidth(), getHeight());
         public static void main(String[] args) {
              SwingUtilities.invokeLater(new Runnable() {
                   public void run() {
                        JFrame f = new JFrame();
                        Painter p = new Painter();
                        JScrollPane sp = new JScrollPane();
                        f.setLayout(new BorderLayout());
                        //sp.add(p)
                        //This was here instead of setViewPortView()
                        sp.setViewportView(p);
                        f.add(sp, BorderLayout.CENTER);
                        f.setSize(400, 300);
                        f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                        f.setVisible(true);
    }

  • Help setting up basic reusable flash component

    Hi, I have a very basic question.  I have an existing flash application, a flex web project, and I would like to take some functionality out of this project, and put it in a separate project to be reused both in the existing application, and as a standalone flash application in a separate html ui.  Can anyone tell me if I need a flex project, or a flex library project for this, and what the very basic set up is?  I don't need help actually coding the component, just the top level organization, thanks so much.

    Hi, I have a very basic question.  I have an existing flash application, a flex web project, and I would like to take some functionality out of this project, and put it in a separate project to be reused both in the existing application, and as a standalone flash application in a separate html ui.  Can anyone tell me if I need a flex project, or a flex library project for this, and what the very basic set up is?  I don't need help actually coding the component, just the top level organization, thanks so much.

  • Generating ProgressBar component at runtime.

    Hi All,
    I have the requirement of generating the ADF Components at runtime. One of which is af:Progressbar.
    I have written the code in the Managedbean to generate the same.
                    ProgressIndicatorBean pgIndicatorBean =
                        new ProgressIndicatorBean();
                    RichProgressIndicator richProgressIndicator =
                        new RichProgressIndicator();
                    richProgressIndicator.setId("pi" + i);
                    //Setting up the BoundedRangeModel as the value to the progressbar
                    richProgressIndicator.setValue(pgIndicatorBean);
                    The code below is for the ProgressIndicatorBean which extends the bounded range model
       * Determinate state model set at 50%.
      public class ProgressIndicatorBean extends BoundedRangeModel
        public long getMaximum()
          return 2;
        public long getValue()
          return 1;
      }When the page is loaded I get the following message in the console and the progressbar is not displayed.
    <ProgressIndicatorRenderer$ProgressIndicatorModel> <<init>> Invalid model provided to progressIndicator (should be a BoundedRangeModel); progressIndicator ID: pi0.Please suggest or point to some documentation on generating the progress bar indicator(programatically) at runtime.
    Thanks,
    Shiva.

    See if changing the superclass to DefaultBoundedRangeModel helps
    public class ProgressIndicatorBean extends BoundedRangeModel

  • How to deleted an implemented menu enhancement component??

    Hello,
    We are implementing enhancement CATS0011 which contains function exit and menu exit.
    Is there a way to UNDO/delete the implemented menu exit(function code)?? We had implemented some function codes but now we just want to keep one function code(menu) and the function exit. However, once we hit the "activate" button,  all the implemented function codes show  in the menu bar and we are unable to find a way to delete the implemented menu enhancement components. Please help..
    Regards,
    Louise

    Hi,
    Unfortunatelly activating the project means activating all its components too. This in turn leads to activating all function/menu exits. There is no way to separate activation of a particular object independently. You have to comment/delete a code for the rest function codes/exists for this menu. Then, these still will be called, but as long as no code is found there, it will not affect your program.
    Regards
    Marcin

  • Using the progressbar component in AS 2

    hey all,
    i'm playing around with the progress bar component included
    in CS3 and am a bit stuck.
    the tutorials i've read that discuss using this component
    don't explain how to use it to target the nested movie clip it's
    contained in. one tutorial i found says to use _root as the source,
    but it drills up to the parent.
    how can i get around this?

    i don't know, are you sure it's not alt+f4?

  • Use the ProgressBar component

    This question was posted in response to the following article: http://help.adobe.com/en_US/as3/components/WS5b3ccc516d4fbf351e63e3d118a9c65b32-7fa4.html

    You give the easiest example.
    The example uses bytesTotal of the Sound object.
    Video, text and images don't have the bytesTotal.
    How do I detect all screen objects and do it for a page transition? ie. Like your first example except for going from one page to another with any media type

Maybe you are looking for

  • My deskjet 3050 j610a isn't connecting to the network in my house.

    my deskjet 3050 j610a isn't connecting to the network in my house.  I've tried about everything and it still not connecting.  It's a wireless printer and it's not connecting to either my desktop or my laptop.  what do I do now?

  • Extremely slow burning w/external firewire dvd burner

    Received replacement refurb dvd drive from LaCie. Burning is extremely slow. Tried unit on another G4 Dual 867MHz RAM 768 MB and unit runs properly. Second unit has no peripherals. Disconnecting everything from original G4 gives very slight improveme

  • WEBUTIL within form Problem

    dears, i was design an form that read an excel sheet and upload the excel sheet contant into a table on DB, the excel sheet contain only 2 columns, the problem is when i compile the form CTRL+K there is no errors shown but when the form run i click B

  • Best Practice loading Dimension Table with Surrogate Keys for Levels

    Hi Experts, how would you load an Oracle dimension table with a hierarchy of at least 5 levels with surrogate keys in each level and a unique dimension key for the dimension table. With OWB it is an integrated feature to use surrogate keys in every l

  • Deploy a Corba POA in WLS 9.1 - how ?

    Hi, http://edocs.bea.com/wls/docs92/rmi/appa.html states that the Portable Object Adapter (POA) is supported. How do you deploy and start a servant in WLS 9.2 ? As startup-class? If yes, is the POA integrated in the WLS thread management? Is the IDL